Skip to content

History problems with R.app GUI 1.20

3 messages · Vili Lehdonvirta, Rob Goedman

#
Hi!

In short, I am experiencing the same problems as this poster:

https://stat.ethz.ch/pipermail/r-help/2006-March/102264.html

I am using R 2.5.1 GUI 1.20 (4535) installed from a binary under OS X  
10.4.10.

More verbosely:

I installed R 2.5.0 on this machine two weeks ago, played around with  
it a little, and installed packages tm and Rstem. I also  
unsuccessfully attempted to install ttda. Today I returned to R with  
the intention of continuing from where I left off. Workspace objects  
were there, but the command history only contained a couple of dozen  
entries from my first session, the last entry being "library 
(ttda)" (after which I probably quit that particular session). I  
noted that new commands were being added to the history drawer, but  
not written to .Rhistory upon exit. However, .Rhistory was touched  
every time (timestamp updated).

I proceeded to uninstall R 2.5.0 by removing /Applications/R.app, / 
Library/Frameworks/R.framework, ~/.RData, ~/.Rhistory and ~/Library/ 
Preferences/org.R-project.R.plist. I then installed R 2.5.1 without  
the additional packages, but the same problem persisted. I  
experimented with the "Save History" and "Load History" buttons with  
the same results as the poster referenced above. The history files  
produced this way look like this:

$ cat h.history
ls()#

summary(x)#

rm(x)#

$

I then uninstalled, rebooted, re-installed again, and ran a short  
session. This time, the session history was saved successfully upon  
exit. However, in subsequent sessions the problem reappeared. I tried  
deleting org.R-project.R.plist but this had no effect.

The text based interface invoked from Terminal seems to work properly  
and the GUI successfully loads the history produced by the text based  
interface.

Any advice would be greatly appreciated!

-- Vili Lehdonvirta
3 days later
#
Vili,

What are your preference settings for history (Startup preferences)  
under R.app?
By selecting the 'cleanup history entries' the extra lines should  
disappear.

R.app history is kind of a superset R history in that it does handle  
multiple line
history, but unfortunately that means you cannot easily go back from  
R.app
to R (the other way should be no problem).

Regards,
Rob
On Jul 6, 2007, at 6:56 AM, Vili Lehdonvirta wrote:

            
#
On 9 Jul 2007, at 17:27, Rob J Goedman wrote:
This worked, thank you. The trick was to check this option and  
restart R.app before even attempting to save a history file. This  
option had become unchecked while I was trying to find ways to make  
the autosave work properly.

So after this, I was able to save and load history files through the  
GUI without any problems coming up at least during my tests. However,  
the automatic loading of history upon exit was still broken: mostly  
not working at all, but a couple of times during my tests actually  
saving it, once in the corrupted format (with #'s).

I then received further advice from Rob:
After I renamed the history file, the autosave/load seemed to start  
working flawlessly as well. All my problems are thus fixed. Thank you!

-- Vili

By the way: since upgrading from 2.5.0 to 2.5.1 I started getting the  
message pasted below in red letters on the editor screen upon  
startup, either before or after the R splash text. Sometimes it does  
not appear at all. Nothing seems broken so far, but I thought I would  
mention it.

2007-07-09 18:22:12.966 R[2234] tossing reply message sequence 1 on  
thread 0x5033380