Here are two simple ways:
=== method1 ===
cat("line1","\n",file="output.txt")
cat("line2","\n",file="output.txt",append=TRUE)
=== method2 ===
sink("output.txt")
cat("line1","\n")
cat("line2","\n")
out <- lm(y~x,data=data.frame(x=1:10,y=(1:10+rnorm(10,0,0.1))))
print(out)
sink()
And then there is 'Sweave'. Check out, for instance
<http://www.stat.umn.edu/~charlie/Sweave/>
You can embed R code, figures, and output from print methods into your latex
document.
ST
--- Stan Hopkins <[EMAIL PROTECTED]> 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
> [[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.
>
____________________________________________________________________________________Ready
for the edge of your seat?
Check out tonight's top picks on Yahoo! TV.
______________________________________________
[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.