CLI

Table of Contents

Rscript vs R CMD BATCH

In practice, use Rscript to run scripts, in command-line or in crons.

Rscript
  • Does NOT echo
  • Output to stdout
  • Can be used in one-liner (i.e. with no input file)
littler
  • All that Rscript does
  • Can read commands from stdin (useful for pipelining)
  • Faster startup time
  • Load the methods package
R CMD BATCH
  • echo the input statements
  • can not output to stdout