[R-SIG-Mac] R.app intractable history problem

Rob Goedman robjgoedman at me.com
Wed Nov 4 16:05:39 CET 2009


Hi Vi,

Is there anything in your in your .Rprofile, .First or .Last?

Another quick suggestion, can you try with e.g. .myRhistory, so  
changing the last part of the path name?

I'm assuming the 'Read history file on startup' item is checked in the  
Startup preferences panel.

Thanks,
Rob


On Nov 3, 2009, at 6:20 PM, vi wrote:

> I have seen this asked before and read the threads but cannot find a
> clear answer to this problem.
>
> I cannot manage to get the history to work from R.app. I am running R
> version 2.9.0 on an iMac OSX 10.5.8 (Leopard). I've tried
>
> 1. Using default paths and names for startup (~) and history file
> (.Rhistory). Run R.app by clicking on the dock, run a few commands. If
> I save workspace, it writes ~/.Rhistory but that file is always blank.
> Next session of R.app there is no history available of course. (If I
> don't save workspace on exit, it does not write a ~/.Rhistory file at
> all. Is this normal?)
>
> 2. Changing startup path but using the same name for history file (~/
> xxx/yyy/.Rhistory). I read my problem could be that R writes to the
> default location after R.app exits, so it could therefore be empty. I
> change the path in the Preferences->Startup-> Initial working
> directory (~/xxx/yyy/) and then the R history file in pref. to /Users/
> myname/xxx/yyy/.Rhistory and hit return before clicking anywhere else.
> It automatically changes it to ~/xxx/yyy/.Rhistory so it apparently
> recognizes my change. Then I enter a few commands in R and quit.
> Again, if I save workspace, it creates ~/xxx/yyy/.Rhistory but it's
> always empty. If I don't save workspace, the specified history file is
> not even created.
>
> 3. Changing startup path and trying to use a different name for
> history file (~/xxx/yyy/.Rhistory_me).  I change the path in the
> Preferences->Startup-> Initial working directory (~/xxx/yyy/) and then
> the R history file in pref. to either /Users/myname/xxx/
> yyy/.Rhistory_me or /Users/myname/xxx/yyy/me_Rhistory and hit return
> before clicking anywhere else. Then I enter a few commands in R and
> quit. I save workspace, it creates ~/xxx/yyy/.Rhistory (note it
> ignores the file name I gave it) but it's always empty. If I go back
> to preferences, the history file box shows ".Rhistory" regardless of
> what name I told it to save it as.
>
> 4. d&d folder onto R.app icon, .Rhistory is written to that folder as
> expected, but it remains empty no matter what.
>
> Tried deleting preference file multiple times, no help. I cannot
> manage to get anything into the .Rhistory file from R.app. R from
> terminal seems okay in this regard.
>
> So what is the way to make R.app actually save its history somewhere?
> I don't want to use the history slide out button on the console and
> have to save a file with each session, I'd like it to be automatic.
> Thanks!
> vi
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac



More information about the R-SIG-Mac mailing list