Federico Calboli <[EMAIL PROTECTED]> wrote:
>
> 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:
>
Take a look at the sink() function. Does that do what you need?
--
Mike Prager, NOAA, Beaufort, NC
* Opinion
Also, this works:
s <- summary(iris)
capture.output(s, file = "myfile.txt")
and the Hmisc and xtable packages can output it in latex:
library(xtable)
print(xtable(s), file = "myfile.tex")
library(Hmisc)
latex(s, file= "myfile.tex")
On Nov 26, 2007 9:59 AM, John Kane <[EMAIL PROTECTED]> wrote:
> 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
?capture.output
On Nov 26, 2007 9:31 AM, Federico Calboli <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> 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))
>
> [for instance]
>
> and I am not
Would something like this do it?
sink(file="reg.txt")
summary(reg)
sink()
--- Federico Calboli <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> 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
Hi All,
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))
[for instance]
and I am not clear how to save this summary into a text file
'automagically', because I need to be able to do i
6 matches
Mail list logo