[R] How to write the entire session to file?

2012-01-27 Thread Ajay Askoolum
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]]

__
R-help@r-project.org 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.


Re: [R] How to write the entire session to file?

2012-01-27 Thread Richard M. Heiberger
If you save the session into a file with the extension R.out, and then open
it in ESS
in emacs, you will get the syntax highlighting.

On Fri, Jan 27, 2012 at 2:03 PM, Ajay Askoolum aa2e...@yahoo.co.uk wrote:

 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]]

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


[[alternative HTML version deleted]]

__
R-help@r-project.org 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.


Re: [R] How to write the entire session to file?

2012-01-27 Thread Greg Snow
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
greg.s...@imail.org
801.408.8111


 -Original Message-
 From: r-help-boun...@r-project.org [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]]
 
 __
 R-help@r-project.org 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.

__
R-help@r-project.org 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.