This is an alternative front end for use in #! scripts and other scripting applications.
Rscript [options] [-e expression] file [args]
- A list of options beginning with --. These can be any of the options of the standard R front-end, and also those described in the details.
- a R expression.
- The name of a file containing R commands. - indicates ‘stdin’.
- Arguments to be passed to the script in
Other invocations invoke the R front-end with selected options. This front-end is convenient for writing #! scripts since it is an executable and takes
file directly as an argument. Options --slave --no-restore are always supplied: these imply --no-save. (The standard Windows command line has no concept of #! scripts, but Cygwin shells do.)
Either one or more -e options or
file should be supplied. When using -e options be aware of the quoting rules in the shell used: see the examples.
- gives details of what
Rscriptis doing. Also passed on to R.
listis a comma-separated list of package names or
NULL. Sets the environment variable R_DEFAULT_PACKAGES which determines the packages loaded on startup. The default for
Rscriptomits methods as it takes about 60% of the startup time.
Documentation reproduced from R 3.0.2. License: GPL-2.