Skip to content

Loadhistory problems

3 messages · Robert Brown FM CEFAS, Brian Ripley, Uwe Ligges

#
History files saved using nFile Save History do not open when using File Load History. I notice that when they are saved they do not seem to have a file extension and there is no option to chose an extension.  Is this a problem.  Other than this it seems so simple that I can't see what the problem is.    I've tried using loadhistory and savehistory with the same problems.  The syntax guide for load history requires the file name, but doesn't specify if this should include and extension or what this should be.  Where am I going wrong
#
Please read the posting guide, and tell us what platform you are using, R 
version and so on.
On Tue, 2 Nov 2004, Robert Brown FM CEFAS wrote:

            
What have file extensions to do with this?  A file name is exactly that, 
the name of a file, the habit of Windows Explorer to hide parts of the 
name notwithstanding.  The default name is .Rhistory, and that is not an 
extension!

This does work as documented in R 2.0.0 under Windows.  If you can
describe what you are doing in enough detail for someone to reproduce it, 
they may be able to spot what is wrong.
#
Robert Brown FM CEFAS wrote:

            
See ?loadhistory. The extension can be choosen arbitrarily, the complete 
default filename is ".Rhistory".

Works for me:

# Type somethimg in R, then:
  savehistory("c:/temp.txt")
  q("no")
# Start R again
  loadhistory("c:/temp.txt")
# Now use the arrow keys and find that
#  the formerly saved history has been
#  loaded correctly ...


Uwe Ligges