>>>>> "Pascal" == Pascal A Niklaus <Pascal.Niklaus
at unibas.ch>
>>>>> on Wed, 17 Dec 2003 16:52:07 +0100 writes:
Pascal> Hi all,
Pascal> I tried to save a complete log of a R session we had in a seminar
Pascal> today... but I didn't succeed.
Pascal> 1) R | tee session.log
Pascal> This saves both input and output, but I do get the cursor key
escape
Pascal> sequences from editing (cursor-up to get last command etc)
instead of
Pascal> the actual command line executed.
Pascal> 2) savehistory
Pascal> Gets commands only, not the output
Pascal> 3) sink
Pascal> Gets output, without the commands producing them
Pascal> I'm sure I'm not the first one encountering this
Pascal> problem - there's for sure a solution, but I didn't
Pascal> manage to find it. If there is no such thing, would
Pascal> it make sense to add such a function to R?
There has been a solution to this problem for a longer time than
R exists:
ESS (Emacs Speaks Statistitics, called "S-mode" in
those days, and used for S and then S-plus).
You work with an (or several) *R* buffer with the whole log
that you (can edit even during use and) save at the end as,
e.g. sess.Rout
{using *.Rout will make emacs/ESS use the ESS-transcript mode
when opening that file later; in ESS-transcript mode, you can
again send the (old) input lines to a running R process, by
simple <Enter>.}
Probably for that reason, nobody of us (developers) has ever
felt enough need for an alternative to implement another one
(platform independently!).
Martin Maechler <maechler at stat.math.ethz.ch>
http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum LEO C16 Leonhardstr. 27
ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND
phone: x-41-1-632-3408 fax: ...-1228 <><