[R] A couple of batch mode questions
Rich Shepard
r@hep@rd @end|ng |rom @pp|-eco@y@@com
Wed Jul 25 17:22:56 CEST 2018
On Wed, 25 Jul 2018, Bert Gunter wrote:
> "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?"
>
> Yes.
Bert,
Thanks for confirming.
> I think your query answers your query: You use Rscript when you want to use
> R in the command environment, perhaps as part of an analytical pipeline;
> and you source an R file when you want to work within R.
That's a given. Why would I prefer Rscript over R CMD BATCH, or
vice-versa? I did not see much difference between the two in their help
files.
Regards,
Rich
More information about the R-help
mailing list