[R-SIG-Mac] You CAN save history on a Mac

Simon Urbanek simon.urbanek at r-project.org
Fri Sep 21 17:59:22 CEST 2012


On Sep 21, 2012, at 11:50 AM, Philip LoGerfo wrote:

> This is in response to Ken Williams' post from January 2011, Can't save
> history using savehistory(). I don't know how one responds directly to a
> thread on this forum, so I guess I'll just start my own.
> Anyway here's what you do:
> 
> Click on R in the menu pane, and scroll down and click on Preferences
> 
> A new window will appear. In its menu, click on Startup.
> 
> At the bottom of the screen, there's a section called history. In there you
> can specify the name of the history file.
> 
> The default is set to .Rapp.history . CHANGE the name to anything without a
> dot (.) at the beginning. Now it will save that
> file to your working directory.

That makes no difference with the saving, it does that anyway. The dot just makes the file invisible in the Finder, but it is always saved with a dot or without.

Cheers,
Simon


> However savehistory() still WILL NOT work.
> 
> To save the file click on the red button at the top left of the R console,
> as if you were trying to close your session. When you do so, your history
> will automatically be saved to the file you named as your history file.
> When the dropdown menu asks if you want end your session or save your
> workspace image, you can click cancel to continue your session with your
> newly saved history file.
> 
> The history file should save the last 500 or so lines.If you want to
> archive that history file and then later save a new history
> file, you will need to rename the earlier history file to something else,
> so that it is not overwritten by the new one. That's important to keep in
> mind, because every time you attempt to close the session, the most recent
> 500 lines will be saved, and the previous file will be overwritten.
> 
> I hope this saves everyone a lot of time and frustration.
> 
> Phil
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> 
> 



More information about the R-SIG-Mac mailing list