[R] running a .r script and saving the output to a file
David Winsemius
dwinsemius at comcast.net
Thu Apr 9 19:27:37 CEST 2009
If you just entered sink(), it would turn *off* sink-ing. You need to
tell R where to write the output that would otherwise go to the
console. (Or if you did something like that then you need to tell us
exactly what you did try.)
?sink # e.g. sink(file="... /test.txt") with correct path substituted
for ...
?source
And perhaps read up on submitting batch jobs from the Windows command
line. See Appendix B of:
http://cran.r-project.org/doc/manuals/R-intro.pdf
--
David Winsemius
On Apr 9, 2009, at 12:46 PM, Gagan Pabla wrote:
> Hello,
>
> I want to run the following commands as a script(.r or .bat) and
> save the
> output in an external file through Windows OS.
>
> data<-read.csv(file="wgatever.csv", head=TRUE, sep=",")
>
> summary(data$SQFT)
>
> hist(data$STAMP)
>
> hist(data$STAMP, col='blue')
>
> hist(data$SHIP, col='blue')
>
>
>
> How could I do that? I have a great problem using the sink() function
> because it produces empty file. Please help!
>
> Gagan
>
> [[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.
David Winsemius, MD
Heritage Laboratories
West Hartford, CT
More information about the R-help
mailing list