[R-SIG-Mac] R.app history forgets
robjgoedman at me.com
Tue May 5 21:20:51 CEST 2009
Thanks for the screen shot.
A bit more experimentation and a quick look at the code refreshed my
If you exit R, .RData is always written to the directory you are in.
In your setting, on q() to quit, R.app should ask for conformation to
save the workspace.
If you don't change your directory it should create a .RData in your
home directory (that's where your R.app started).
Preferences do not provide help here, but you could create a .Last
function with a save.image() command in it to force storing the .RData
file to a fixed directory. In that case you can opt to set the Quit
preferences to 'No' (don't ask me to store the workspace).
For history its a (tiny) bit more flexible. By selecting an absolute
path, like you have in your setting, it will always store the current
available history commands in that file (including the ones that were
read in during startup, so the new commands are at the end of the file).
If this does not work for you, can you send me your ~/.Rhistory file
after executing a last new command in R.app, maybe something like
'testHist <- 1' and quitting R.app?
As you found in the archives, a few folks did have trouble (usually
because R.app could not write to the selected directory).
After this email it might be better to take this discussion off-line.
On May 5, 2009, at 11:50 AM, Loren Engrav wrote:
> Thank you
>> From: Rob Goedman <robjgoedman at me.com>
>> Date: Tue, 05 May 2009 11:36:25 -0700
>> To: Loren Engrav <engrav at u.washington.edu>
>> Cc: "r-sig-mac at stat.math.ethz.ch" <r-sig-mac at stat.math.ethz.ch>
>> Subject: Re: [R-SIG-Mac] R.app history forgets
>> Can you send me a screen copy of the Startup preferences ( with the
>> cursor inside the Startup Preferences window, press Command-Shift-4,
>> followed by pressing the spacebar, followed by a click of the mouse
>> button, this should write it to your Deskop as 'Picture 1').
>> On May 5, 2009, at 11:24 AM, Loren Engrav wrote:
>>> Mac OS 10.5.5 and R.app 2.9.0
>>> I start up, run a few things, and quit (w or wo save) and no
>>> Then I restart and the recent commands are no longer in Rhistory
>>> The only box I have checked in History preferences is Read on
>>> Startup and I
>>> have max entries set to 5000
>>> I see queries about this before but I could find no solution
>>> Thank you
>>> [[alternative HTML version deleted]]
>>> R-SIG-Mac mailing list
>>> R-SIG-Mac at stat.math.ethz.ch
> <Picture 3.png>
On May 5, 2009, at 9:37 AM, Loren Engrav wrote:
> Thank you
> The return before clicking anywhere else solved that problem, clever
> So I trash all invisible .Rhistory and .Rdata files
> Then made a new folder (called R_History_Data) and aim Preferences
> at this
> folder (using the return)
> Then run R.app and yes, I have one .Rhistory and one .Rdata in that
> But then I change the working directory and do some stuff
> Then quit and save working directory
> And now I have two of each invisible files, one in R_History_Data
> and one in
> the working directory folder
> So it still appears as I move from directory to directory I will leave
> invisible .Rhistory and .Rdata files all over
> Is it possible to have Rhistory and Rdata always written to the
> R_History_Data folder?
More information about the R-SIG-Mac