capture.output(moransI, file="moransI.txt")
----------------------------------------------
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77843-4352
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Alaios
> Sent: Tuesday, May 15, 2012 12:10 PM
> To: R help
> Subject: [R] save to Rdata file and to txt
>
> Dear all,
> I am using the
>
>
> save(moransI,file=saveString) to save a variable called moransI to a
> file.
> This works well but unfortunately I have to open R every time I want to
> look to the contents.
>
> Would it be also possible to have a second line that saves the contents
> of the moransI variable in a normal txt file?
> The ideal is inside the txt file to get what you see in R's console
> when you print the moransI variable.
> So something like that
>
> moransI
> [[1]]
> [1] "Moran.I.First"
>
> [[2]]
> [[2]]$observed
> [1] 0.06988288
>
> [[2]]$expected
> [1] -0.03225806
>
> [[2]]$sd
> [1] 0.02513276
>
> [[2]]$p.value
> [1] 4.822722e-05
>
>
>
> Cheers
> Alex
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org 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.