[R] A couple of batch mode questions

Rich Shepard r@hep@rd @ending from @ppl-eco@y@@com
Wed Jul 25 16:41:55 CEST 2018

   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

   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?



More information about the R-help mailing list