Skip to content

running a .r script and saving the output to a file

2 messages · Gagan Pabla, David Winsemius

#
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