Within R one can use source() to run a batch file of R commands, while R CMD 
BATCH
and Rscript are run from the command line. Is this correct?

  Given these choices, when would I want to run a script within R using
source(), and when would it be better for me to run it from the command
line?

  Reading Appendix B.4 Scripting with R in R-info.pdf, ?Rscipt, and ?BATCH I
get the impression that 'R CMD BATCH' reads from a named file and writes
output to a named file and Rscript reads/writes to stdin/stdout using
redirection. What are the pros and cons of each? When (or why) would I
select one over the other?

TIA,

Rich

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.

Reply via email to