[R] Redirecting print output

Greg Snow Greg.Snow at intermountainmail.org
Thu Jul 26 19:21:29 CEST 2007

You may want to look at the R2HTML package as one approach (others have
already told you about sink and cat).

Another approach is to use the variations on sweave.  Here you set up a
template file with the code you want run as well as any explanitory text
(you can even write an entire report), then process this with sweave and
the output will be included.  The original sweave works with LaTeX,
there is an HTML driver for sweave in the R2HTML package (so the source
and final documents are html) and there is an odfWeave package that lets
you create the template and output in a word processor (uses the
openoffice word processor, but since you can convert from and to Msword
from there, this is not much of a limitation).

Hope this helps,

Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at intermountainmail.org
(801) 408-8111

> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch 
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Stan Hopkins
> Sent: Monday, July 23, 2007 9:35 PM
> To: R help
> Subject: [R] Redirecting print output
> I see a rich set of graphic device functions to redirect that 
> output.  Are there commands to redirect text as well.  I have 
> a set of functions that execute many linear regression tests 
> serially and I want to capture this in a file for printing.
> Thanks,
> Stan Hopkins
> 	[[alternative HTML version deleted]]
> ______________________________________________
> R-help at stat.math.ethz.ch 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.

More information about the R-help mailing list