I'm using R from a Linux command prompt, and am logging the whole session by tee'ing the R invocation line. ie. R | tee -a Rlog.txt Is there a better way to log all the session input and output from within R? Stan Smiley stan.smiley at genetics.utah.edu
Yes. I work with ESS and xemacs--it is an awesome system. Does not only do session logging, but allows you to "step" through a saved session, performing all of the commands just as before, skipping over output. You can also "clean" a session to get only the commands (all else stripped out). Version control is possible if you write large code chunks. Also, you can edit objects in another frame while your r-process is running. There is also completion functionality, so you can type part of a function, press tab, and have it completed (or options offered). Finally, there is history (just like using readline-enabled command-line). http://www.analytics.washington.edu/Zope/wikis/ess/FrontPage Sean On 12/12/03 2:55 PM, "Stan Smiley" <swsmiley at genetics.utah.edu> wrote:> > I'm using R from a Linux command prompt, and am logging the > whole session by tee'ing the R invocation line. ie. R | tee -a Rlog.txt > > Is there a better way to log all the session input and output from > within R? > > Stan Smiley > stan.smiley at genetics.utah.edu > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help >
On Fri, Dec 12, 2003 at 12:55:43PM -0700, Stan Smiley wrote:> I'm using R from a Linux command prompt, and am logging the > whole session by tee'ing the R invocation line. ie. R | tee -a Rlog.txt > > Is there a better way to log all the session input and output from > within R??sink -- Those are my principles, and if you don't like them... well, I have others. -- Groucho Marx
Stan Smiley wrote:> Is there a better way to log all the session input and output from > within R?What everyone else said, plus ?savehistory Cheers Jason -- Indigo Industrial Controls Ltd. http://www.indigoindustrial.co.nz 64-21-343-545 jasont at indigoindustrial.co.nz
another option in LINUX/UNIX is 'script' $ script R etc. $ CTRL-D script - make typescript of terminal session SYNOPSIS script [-a] [-f] [-q] [-t] [file] DESCRIPTION Script makes a typescript of everything printed on your terminal. It is useful for students who need a hardcopy record of an interactive session as proof of an assignment, as the typescript file can be printed out later with lpr(1).