[R] How to write the output of a function into a file?
Ko-Kang Kevin Wang
kwan022 at stat.auckland.ac.nz
Wed Mar 26 02:12:10 CET 2003
Hi,
On Tue, 25 Mar 2003, yanni at cec wrote:
> Date: Tue, 25 Mar 2003 17:58:33 -0600
> From: "yanni at cec" <ys3 at cec.wustl.edu>
> To: r-help at stat.math.ethz.ch
> Subject: [R] How to write the output of a function into a file?
>
> I cannot find the solutions in the mannual about "import and export of data".
> For example, I run
> >chisq.test(x,p=probs)
> chi-squared.....
>
> .........
>
> How can I write the output into a file? Is there some file operations in R?
Take a look at
?write
?save
> Actually, I only want to save the P-value. But I don't know how I can extract the P-value field only from the output
> of chisq.test. So, I think I would better save all the output. I tried cat/write....They cannot do this.
It is very clearly documented in ?chisq.test (to get only the p-value).
--
Cheers,
Kevin
------------------------------------------------------------------------------
/* Time is the greatest teacher, unfortunately it kills its students */
--
Ko-Kang Kevin Wang
Master of Science (MSc) Student
SLC Tutor and Lab Demonstrator
Department of Statistics
University of Auckland
New Zealand
Homepage: http://www.stat.auckland.ac.nz/~kwan022
Ph: 373-7599
x88475 (City)
x88480 (Tamaki)
More information about the R-help
mailing list