R 1.4.1 is not current. I suggest you try again with the current version 1.5.0, as that has a lot of other benefits. You get the `no history available to save' message from savehistroy() if either of HAVE_LIBREADLINE HAVE_READLINE_HISTORY_H is not defined (or you have a non-interactive session or used --no-readline). (I wrote that interface it ....) So the issue is in *your* readline installation as described by *you* to configure. The answer is simple: you need to read the installation manual and ensure that you supply a suitable version of readline *and its headers*.
On Tue, 30 Apr 2002, Jay F Shachter wrote:
Why would R lack history capability? Someone in a private electronic mail message suggested the possibility that I was running R in a non-writable directory. This is not the case, as the following logfile shows (where "$ " is my shell prompt): $ ls -ld `pwd` drwxrwxrwx 15 sys sys 2560 Apr 30 08:10 /tmp $ R --vanilla R : Copyright 2002, The R Development Core Team Version 1.4.1 (2002-01-30) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type `license()' or `licence()' for distribution details. R is a collaborative project with many contributors. Type `contributors()' for more information. Type `demo()' for some demos, `help()' for on-line help, or `help.start()' for a HTML browser interface to help. Type `q()' to quit R.
debug(history) debug(savehistory) history()
debugging in: history()
debug: {
file1 <- tempfile("Rrawhist")
savehistory(file1)
rawhist <- scan(file1, what = "", quiet = TRUE, sep = "\n")
unlink(file1)
nlines <- length(rawhist)
inds <- max(1, nlines - max.show):nlines
if (reverse)
inds <- rev(inds)
file2 <- tempfile("hist")
write(rawhist[inds], file2)
file.show(file2, title = "R History", delete.file = TRUE)
}
Browse[1]>
debug: file1 <- tempfile("Rrawhist")
Browse[1]>
debug: savehistory(file1)
Browse[1]>
debugging in: savehistory(file1)
debug: invisible(.Internal(savehistory(file)))
Browse[1]>
Error in savehistory(file) : no history available to save
q()
$ My R clearly lacks history capability, and I have no idea why. What can be the cause of this behavior, and how can it be undone? Jay F. Shachter 6424 N Whipple St Chicago IL 60645-4111 (1-773)7613784 jay at m5.chi.il.us -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
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 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._