A different approach is to use the etxtStart function in the TeachingDemos 
package.  You need to run this before you start, then it will save everything 
(commands and output and plots if you tell it to) to a file that can then be 
post processed to give a file that shows basic coloring (or with options in the 
post processing, even more coloring).  Though it may be better to just run your 
R session through an editor like ESS/emacs or others.

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[email protected]
801.408.8111


> -----Original Message-----
> From: [email protected] [mailto:r-help-bounces@r-
> project.org] On Behalf Of Ajay Askoolum
> Sent: Friday, January 27, 2012 12:04 PM
> To: R General Forum
> Subject: [R] How to write the entire session to file?
> 
> savehistory writes all the executed lines from the session.
> 
> How can I write everything (executed lines and output) from the active
> session to a file?
> 
> Using Edit | Select All then Edit Copy, I can copy everything to the
> clipboard and write the whole thing to a file manually.
> 
> If I just used the clipboard, I can paste the whole content into
> another edittor (for documentation). Is there a way to copy the content
> of the session with the syntax colouring?
> 
> Thanks.
>       [[alternative HTML version deleted]]
> 
> ______________________________________________
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to