[R] Running R non-interactively

From: Gang Chen <gangchen_at_mail.nih.gov>
Date: Wed, 6 Feb 2008 11:01:32 -0500


Normally I can run an R script in batch mode with a command like this

R CMD BATCH MyScript.R MyOutput &

However I prefer to write another script containing something like

R --no-restore --save --no-readline < $1 >$2

so that I could run the original script simply on the prompt as

MyScript.R MyOutput &

The second method is almost the same as the R CMD BATCH method except MyOutput does not contain the output from the OS calls such as system (). So what option(s) should add in the second approach to make it identical to R CMD BATCH?

Thanks,
Gang



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. Received on Wed 06 Feb 2008 - 16:08:32 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 06 Feb 2008 - 16:30:12 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive