Hello, The history function doesn't seems to work when I am working with R. I have a .Rhistory file in my working directory and I have tried savehistory(file = ".Rhistory") or the command given in the history help : .Last <- function() if(interactive()) try(savehistory(".Rhistory")) and I get the same error message Error in savehistory(file) : no history available to save Is there any other variable to set up? Nathalie Peyrard
It depends on your platform. E.g. on Unix/Linux, ?savehistory says Details: This works under the 'readline' and GNOME interfaces, but not if 'readline' is not available (for example, in batch use). To be able to help you further, we would need quite precise details of your platform and which interface you are using. On Wed, 28 Jul 2004, Peyrard Nathalie wrote:> The history function doesn't seems to work when I am working with R. > I have a .Rhistory file in my working directory and I have tried > savehistory(file = ".Rhistory") > or the command given in the history help : > .Last <- function() > if(interactive()) try(savehistory(".Rhistory")) > > and I get the same error message > Error in savehistory(file) : no history available to save-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
I recall having a similar problem a while back, and it turned out that it was due to command line editing not being available. This in turn was due to a problem with the readline package. I think we had a flakey version (obtained as a Sun package?) and when we got another version (from GNU?) and installed it --- and then rebuilt R --- command line editing (and savehistory()) worked fine. Sorry to be vague, but I don't have good records of what went on, and it was a couple of years ago. Check on command line editing first --- in R execute capabilities() and if ``cledit'' turns out to be FALSE, then readline is probably your problem. Peter Dalgaard may be able to give you better insight as to how to fix it. cheers, Rolf Turner rolf at math.unb.ca ===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+== Nathalie.Peyrard wrote:> The history function doesn't seems to work when I am working with R. > I have a .Rhistory file in my working directory and I have tried > savehistory(file = ".Rhistory") > or the command given in the history help : > .Last <- function() > if(interactive()) try(savehistory(".Rhistory")) > > and I get the same error message > Error in savehistory(file) : no history available to save > > Is there any other variable to set up?