[R-SIG-Mac] getting history() to work

David david.b.a.epstein at googlemail.com
Thu Apr 8 18:45:37 CEST 2010



On 8 Apr, 13:32, David Winsemius <dwinsem... at comcast.net> wrote:
> On Apr 8, 2010, at 4:56 AM, David wrote:
>
> > When I type history() to the R console, I get a new window that is
> > always blank. How can I get history() working?

...[snip]...

> It's been a whiles since I used R 2.8 but perhaps the current behavior  
> is similar. What happens when you:
>
> A) Open the Preferences dialog in the RGUI and look at your history  
> settings (which in the current GUI are in the Startup panel.)
Looks normal to me. Setting relating to history seem OK. Should I send
you personally a screen shot? I don't think I can attach an image for
the whole forum. In Preferences, the history file was listed as
.Rhistory. I tried to change this to ~/.Rhistory, but when I closed R
and reopened it, it reverted to .Rhistory.

> B) Open a Terminal.app window and type in:
>   locate .Rhistory
I got a large number of hits. I recognized all the directories as
directories which had been, at one time or another, possibly with a
different version of R, the working directory for some R program. I
deleted all these hits as confusing the issue. I found one .Rhistory
in the working directory, containing a single command that I almost
certainly gave some time today. At some point today I deleted this
file and it has been re-created with this single command in it.
Nevertheless, history() continues to give me a blank screen. If things
were operating as I wish, there would have been many commands
in .Rhistory, since I have typed many commands to the R console today.
...[snip]...

David



More information about the R-SIG-Mac mailing list