[R] Logging an R session to file?

Prof Brian D Ripley ripley at stats.ox.ac.uk
Thu Oct 26 08:38:47 CEST 2000

On Wed, 25 Oct 2000, Mike Beddo wrote:

> Prof Ripley,
> It's been many years since I used S or S-plus, so it's hard to remember
> what I had then. My S book, "An Interactive Enviroment For Data Analysis
> and Graphics," by R. Becker and J. Chambers, on page 139 (Keeping Track of
> an Analysis: Sink and Diary) says "Executing diary() activates a
> diary-keeping facility in S which appends the date and time to the file
> ''diary'' in the current UNIX directory. This is followed by all
> expressions subsequently typed to S."

Indeed very many years. That's S version 1, 1984 vintage. It has not been
in S since ca 1989 as far as I know, as the 1988 S version 2 introduced an
auditing facility.

> I'm new to R, but this seems too useful a facility to be overlooked? Or
> maybe R users do it a different way?

There are lots of ways to keep a record of a session.  ESS users under
Emacs do it one way, most versions of R will record recent commands in
a file .Rhistory, in console versions you can just save the console output,
and so on.

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

More information about the R-help mailing list