[R] automatic logging of commands
    David R. Bickel 
    dbickel at mcg.edu
       
    Thu Aug 21 20:59:59 CEST 2003
    
    
  
Prof. Ripley,
Thank you for directing me to savehistory; that is what I needed. Apple's
Darwin OS is derived from BSD UNIX, but it is not certified by SCO. I found
a way to redirect all R standard input and output to a file with this
command from a UNIX terminal:
/usr/local/bin/R | tee filename.txt
Unlike savehistory, that will not work on non-UNIX systems.
David
On 8/21/03 1:52p, "Prof Brian Ripley" <ripley at stats.ox.ac.uk> wrote:
> All commands are logged in the history file, if your `UNIX' (is that
> really a certified UNIX?) version of R supports history files.
> 
> See e.g. ?savehistory.
> 
> On Thu, 21 Aug 2003, David R. Bickel wrote:
> 
>> Is there an R function that automatically writes all input and output to a
>> file? I would at least like it to log all the commands I enter, and to
>> preferably also write the standard output to the file as well as to the
>> screen. (The ideal would be to write the input to one file and both the
>> input and output to another file.) I tried R2HTML for this, but I could not
>> get it to work consistently.
>> 
>> I am using a UNIX version of R:
>>> version
>>          _      
>> platform powerpc-apple-darwin6.6
>> arch     powerpc
>> os       darwin6.6
>> system   powerpc, darwin6.6
>> status   Patched
>> major    1      
>> minor    7.1    
>> year     2003   
>> month    06     
>> day      21     
>> language R      
_______________________________________
http://www.mcg.edu/research/biostat/bickel.html
David R. Bickel, Assistant Professor
Medical College of Georgia
Office of Biostatistics and Bioinformatics
(706) 721-4697, 721-3785; Fax: 721-6294
dbickel at mcg.edu or bickel at prueba.info
    
    
More information about the R-help
mailing list