Stan Hopkins wrote:
> 
> 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
> 

Yes, there are.
?sink

You could also run your functions from a batch mode:
R < your_script.R > output.txt
or
Rscript your_script.R > output.txt

This, however, will give you a single file, while sink() allows creation of
multiple files.

capture.output can store the output in an array of character strings.

-- 
View this message in context: 
http://www.nabble.com/Redirecting-print-output-tf4134131.html#a11758652
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@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.

Reply via email to