[R] .Rhistory in R.app

David Winsemius dwinsemius at comcast.net
Sun Apr 8 15:53:20 CEST 2012


On Apr 8, 2012, at 12:56 AM, Berend Hasselman wrote:

>
> On 08-04-2012, at 03:31, nkschmidt wrote:
>
>> Hi Maria, you need to name your history file  
>> somefilename.Rapp.history,
>> example
>>
>> savehistory(file = "history.Rapp.history")
>>
>> /nkschmidt
>
> You replied to a message almost two years old, which to my mind is  
> pretty useless.

Not only that but the information is at best incomplete, and to some  
extent misleading.

The saving of history sessions with the name ".Rhistory" in the  
working directory after normally exiting R.app is automatic unless  
specifically refused or disabled. Maria should have offered what  
evidence she has for them not being saved under the name .Rhistory.  
They are, of course,  invisible to the Mac Finder due to their having  
a leading<dot> in their name. That's my guess for why she might have  
erroneously concluded that they are not being saved. (I run my Finder  
with settings that show these "dot-files" but one does need to know  
that these dotfiles often contain system critical stuff so deleting  
them is unwise.) If she wanted to check the accuracy of this  
information she could have opened a Terminal session , navigate to the  
working directory and use the unix command: ls  ... this is an example  
of such usage:

david-winsemiuss-mac-pro:~ davidwinsemius$ ls .Rhistory
.Rhistory

The Preferences panel from the File menu allows one to disable loading  
of history files when the next session is started, but under normal  
operating conditions she should also be able to see the history by  
clicking on the green-and-yellow striped icon at the top of her R  
Console window: "The Show/Hide R command History" icon.

-- 
David.

> Original message is here: https://stat.ethz.ch/pipermail/r-help/2009-December/221490.html
>
> Nabble does not host the R-help archive.
>
> Berend
>
>
>> Maria Gouskova wrote
>>>
>>> Dear R users,
>>>
>>> I am having a minor but annoying issue with R.app. It doesn't retain
>>> the history information from the previous sessions. By "history," I
>>> mean a record of commands/functions entered into R rather than the
>>> list of objects--that is properly recorded in the .Rdata file as  
>>> well
>>> as in a workspace file I save separately.
>>> (...)
>>> So if there is some kind of a fix
>>> that doesn't involve upgrading R, I'd love to hear about it.
>>>
>>> Maria Gouskova
>>>
>>
>>
>> --
>> View this message in context: http://r.789695.n4.nabble.com/Rhistory-in-R-app-tp956293p4540340.html
>> Sent from the R help mailing list archive at Nabble.com.
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list