> I would like to output the results of a function into a text file,
> legible as a such. The function produces a summary quite like:
>
> summary(lm(x ~ y + w * z))
You can either redirect output to a file using cat or sink; generate a
latex table using xtable (in the xtable package); or export the relevant
bits (e.g. the coefficients matrix) using write.csv.
Based upon your message, sink is probably your best bet/
sink(file="foo.txt")
summary(lm(x ~ y + w * z))
sink(NULL)
Regards,
Richie.
Mathematical Sciences Unit
HSL
------------------------------------------------------------------------
ATTENTION:
This message contains privileged and confidential inform...{{dropped:20}}
______________________________________________
[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.