[R-SIG-Mac] Can't save history using savehistory()

Ken.Williams at thomsonreuters.com Ken.Williams at thomsonreuters.com
Wed Jan 12 22:41:41 CET 2011


savehistory() history doesn't seem to be doing anything on my platform.  Here's an example:

=======================================
[R.app GUI 1.35 (5665) i386-apple-darwin9.8.0]

[History restored from /Users/u0048513/.Rapp.history]
> tail(readLines(file("~/.Rapp.history")))
[1] "?Matrix"                             "15*275/1024"                         "log10(2^32/4)"
[4] "log2(10^6)"                          "library(ff)#"                        "ffload(\"ff/a\", rootpath=\"/tmp\")"

> 5+5
[1] 10

> savehistory('~/.Rapp.history')

> tail(readLines(file("~/.Rapp.history")))
[1] "?Matrix"                             "15*275/1024"                         "log10(2^32/4)"
[4] "log2(10^6)"                          "library(ff)#"                        "ffload(\"ff/a\", rootpath=\"/tmp\")"

> sessionInfo()
R version 2.12.1 (2010-12-16)
Platform: i386-apple-darwin9.8.0/i386 (32-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

> file.info('~/.Rapp.history')
                 size isdir mode               mtime               ctime               atime uid gid    uname   grname
~/.Rapp.history 17357 FALSE  644 2011-01-12 15:36:20 2011-01-12 15:36:20 2011-01-12 15:36:25 502 502 u0048513 u0048513
=======================================

As the last line shows, there shouldn't be a permissions problem.  One suspicious thing is that there are exactly 512 lines in the file – but in the R.app preference pane I have the max number of history items set to 1000, so perhaps that's a red herring.

Any thoughts?

--
Ken Williams
Senior Research Scientist

Thomson Reuters

Phone: 651-848-7712
ken.williams at thomsonreuters.com
http://thomsonreuters.com



More information about the R-SIG-Mac mailing list