R.app intractable history problem
On Nov 5, 2009, at 8:36, Rob Goedman <robjgoedman at me.com> wrote:
This is clearly a bug.
Can you point me to the docs that support that claim? AFAIR q/quit exits R without any regard to things open in the GUI - it's not what you usually want - most users will prefer the normal app shutdown using close or quit menu.
Thanks Ga?l! Just now tried it (on SnowLeopard) and it shows the sam e behavior. In R.app, q() should also get to the point where it will close the console window (which is where we update preferences, history etc).
This was never intended to work in the GUI because it entirely bypasses the app quitting mechanism. You should never use q/quit in the GUI unless you really mean to exit R right away and discard everything (history, all open files, ...)
I'll check the sources to see if and why it is not (or no longer?) getting to that point.
It never did since the GUI has no control over the quit function which exits the process regardless of the GUI (I'm not saying this is the best way to do it, but that is the design so far.. It will require modification to R itself to change this...) Cheers, S Sent from my iPhone
Thanks for staying with this! Rob On Nov 5, 2009, at 7:52 AM, Vishy Iyer wrote:
On Thu, Nov 5, 2009 at 2:49 AM, Ga?l Laurans <glaurans at gmail.com> wrote:
The way you quit R seems to make a difference. If you use the menu or the Cmd+Q shortcut, R.app will save its history in the file defined in the preferences, but if you type quit() at the R prompt, R.app will not save its history at all.
Wow, this completely solved my problem! I couldn't find this documented anywhere, but as you said, if I quit R.app using the menu command or Cmd+Q or the switch icon on the top right of the GUI, it writes the history file properly. I don't even need to save the workspace anymore! But if I quit with q(), which is what I was doing all this time before, the .Rhistory file was always empty. I guess I was running into the problem of R always overwriting R.app. I still need to check into the issue of the renaming of the history file (changing automatically from my name to ".Rhistory") but I bet it's related to the same thing of how I quit. Rob to answer your question, I can indeed make changes to the preferences and they ARE carried over into the next session (as long as it's not renaming the history file). So thanks again for all the help! V. [[alternative HTML version deleted]]
_______________________________________________ R-SIG-Mac mailing list R-SIG-Mac at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-mac
_______________________________________________ R-SIG-Mac mailing list R-SIG-Mac at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-mac