[R] "Save to File..." option on File menu

Talbot Katz topkatz at msn.com
Wed Sep 12 21:05:10 CEST 2007


Hi.

There was an interesting thread about a year ago, called  'Command 
equivalent of rgui "File, Save to File"?' 
(http://tolstoy.newcastle.edu.au/R/e2/help/06/09/0553.html) started by 
Michael Prager, and contributed to by Duncan Murdoch (I didn't notice 
anything beyond the four entries they posted).  The question was how to 
replicate programmatically the "Save to File..." option on the File menu.  
The closest answers given involved either running in batch or using the 
sink() command.  Perhaps I don't understand the sink() command well enough, 
but it appears to me that you have to set it up before you run commands, and 
that it can't be used to save command output from commands that were already 
run; am I right about this?  Whereas the "Save to File..." command scoops up 
everything that's still in the console.  Here is my problem.  I am running R 
on Linux in a VNC window.  I'd like to save my console output, but there 
doesn't appear to be a File menu available and I didn't start out with the 
sink() command.  Is there any way to replicate "Save to File..." in this 
situation?  Thanks!

--  TMK  --
212-460-5430	home
917-656-5351	cell



More information about the R-help mailing list