Skip to content

R.app ?bug or me

15 messages · Loren Engrav, Simon Urbanek, John Maindonald +3 more

#
Using Mac 10.4.11
And sessionInfo() say
R version 2.6.1 (2007-11-26)
powerpc-apple-darwin8.10.1

locale:
en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base


Directory is ABC and history is XYZ
So I change directory to FGH and history to QRS
Then I quit R and say save workspace

Then I start R
And am back to workspace ABC and history XYZ
Would seem I should be at FGH and QRS

What am I missing? Is it staring me in the face and I cannot see it?

Thank you

Loren Engrav
Univ Washington
Seattle
#
On Dec 8, 2007, at 6:37 PM, Loren Engrav wrote:

            
Well, if ABC and XYZ is in home and you didn't change the default  
settings and started R.app directly then that is exactly as expected.
Why? That would be quite bad as FGH and QRS have nothing to do with  
your home. The whole point of changing a directory is usually exactly  
the fact that you don't want to overwrite the workspace in your home.
I'd say reading 4.3.3 in the R for Mac FAQ may possibly explain this a  
bit ...

Cheers,
Simon

PS: Please use R-SIG-Mac for Mac-specific questions.
#
Thank you for the help

Ah so, default is in Preferences and the new is under Misc in the menu bar
I can do that and will

But might it not be more convenient if on R.app start you went to where you
were last time, since most often you wish to go to the place you just left

As for
This is appearing in R-SIG-Mac.  What am I missing here?

Thanks again.

Loren Engrav
Univ Washington
Seattle
#
I notice that 4.3.3 says"

"Finally it is possible to use a specific directory for a single
R session by dragging a folder onto the R.app icon. If R.app
is not runnig, this will cause R.app to be started in the
directory corresponding to the folder dragged. The same
can be achieved on the command line - for example
open -a R . causes R.app to be started using the current
directory as the startup working directory."

The final statement seems incorrect, at all events without
some further pre-conditions:

At the terminal:

  ch2$ pwd
  /Users/johnm/r/ch2
  ch2$ ls -lt .RData
  -rw-r--r--  1 johnm  johnm  2980  9 Dec 11:31 .RData
  ch2$ open -a R

At the R console that is started:

  > getwd()
  [1] "/Users/johnm/r"
  > sessionInfo()
  R version 2.6.1 (2007-11-26)
  i386-apple-darwin8.10.1

  locale:
  en_AU.UTF-8/en_AU.UTF-8/en_AU.UTF-8/C/en_AU.UTF-8/en_AU.UTF-8

  attached base packages:
  [1] stats     graphics  grDevices utils     datasets  methods   base

Incidentally is making copies of R.app an appropriate way to
allow multiple simultaneous sessions of the R Gui? Or is there
some more direct way to achieve this?

John Maindonald.

John Maindonald             email: john.maindonald at anu.edu.au
phone : +61 2 (6125)3473    fax  : +61 2(6125)5549
Centre for Mathematics & Its Applications, Room 1194,
John Dedman Mathematical Sciences Building (Building 27)
Australian National University, Canberra ACT 0200.
On 9 Dec 2007, at 10:57 AM, Simon Urbanek wrote:

            
#
I think you missed the dot at the end, that's all. You want:
open -a R .

James
#
On Dec 8, 2007, at 7:48 PM, Loren Engrav wrote:

            
Although it would be possible to make that a configurable option, it'd  
definitely not want that. It would make R's behavior sort of random,  
because you would never know where it will start from ... a really bad  
thing (IMHO).
  If you want to work on a specific project, it's much more convenient  
to just drag the directory on R to start it and you can then work on  
multiple projects conveniently and independently.
Oops, sorry, my bad, the "To" was showing R-devel for some mysterious  
reason...

Cheers,
Simon
#
I understand, and can work with this

But then R in the Mac dock is not of much value as it always goes "home"; no
matter what you were working on last

Loren Engrav
Univ Washington
Seattle
#
Thanks.

Indeed I missed the dot.  It might be good to have an
example that specifies the directory path.

John Maindonald             email: john.maindonald at anu.edu.au
phone : +61 2 (6125)3473    fax  : +61 2(6125)5549
Centre for Mathematics & Its Applications, Room 1194,
John Dedman Mathematical Sciences Building (Building 27)
Australian National University, Canberra ACT 0200.
On 9 Dec 2007, at 1:39 PM, James Reilly wrote:

            
#
On Dec 9, 2007, at 12:03 AM, Loren Engrav wrote:

            
The purpose of the dock is to get quick access to the application -  
that has no "value" in terms of which workspace you want to start -  
it's still up to you, not the dock. What I was talking about was R in  
the dock, so I don't see the connection.

Anyway, as I said earlier, I think that changing the working directory  
on startup to some random path without user having a say in this is a  
really bad idea and I think a lot of users would find it disturbing.

Cheers,
Simon
#
Ok, I can drag and drop, thank you
#
Two questions about Mac R.app please
Using 10.4.11

In Preferences Startup window the entire pathway of the directory does not
show, is there a way to make it all show, I set smaller font or something

And when I set a pathway for the Rhistory just below that, then close the
window, then come back, the pathway is gone, just the word .Rhistory, but
the pathway still is in effect, is there a way I can keep the pathway
showing
#
On Dec 9, 2007, at 7:12 AM, Simon Urbanek wrote:

            
And I think most everyone else agrees with what Simon says here..

Kasper
#
I think discussion now confused, at least on my end, as I agree too

Home directory in Preferences is good
Drag and drop to go to new directories is good
Random would be bad

But most often when I start R.app I go back to the place I was, which is
usually not home, so finding the drop to drag takes some effort, merely
double clicking seemed like it would be convenient

But I can drag and drop

And more code would make the thing fatter with more bugs
So I can do it
#
Hi Loren,

The great thing about R is its depth
of functionality.  You could write
a .Last() function in your .Rprofile
that makes a note of your session
working directory (in a clear text
file, or by modifying .Rprofile itself, ...)
so that your .First() function in .Rprofile
can find out where you were last and
start you up there.  

Cheers

Steve McKinney

-----Original Message-----
From: r-sig-mac-bounces at stat.math.ethz.ch on behalf of Loren Engrav
Sent: Mon 12/10/2007 10:43 AM
To: r-sig-mac at stat.math.ethz.ch
Subject: Re: [R-SIG-Mac] R.app ?bug or me
 
I think discussion now confused, at least on my end, as I agree too

Home directory in Preferences is good
Drag and drop to go to new directories is good
Random would be bad

But most often when I start R.app I go back to the place I was, which is
usually not home, so finding the drop to drag takes some effort, merely
double clicking seemed like it would be convenient

But I can drag and drop

And more code would make the thing fatter with more bugs
So I can do it
1 day later
#
Thank you
That sounds clever, probably too clever for me
I think I will just drag and drop