2025-03-14 21:59:59 -06:00
|
|
|
# Rscript
|
|
|
|
|
|
|
|
|
|
> Run a script with the R programming language.
|
2025-06-28 19:25:29 -06:00
|
|
|
> More information: <https://manned.org/Rscript>.
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Run a script:
|
|
|
|
|
|
|
|
|
|
`Rscript {{path/to/file.R}}`
|
|
|
|
|
|
|
|
|
|
- Run a script in vanilla mode (i.e. a blank session that doesn't save the workspace at the end):
|
|
|
|
|
|
|
|
|
|
`Rscript --vanilla {{path/to/file.R}}`
|
|
|
|
|
|
|
|
|
|
- Execute one or more R expressions:
|
|
|
|
|
|
|
|
|
|
`Rscript -e {{expression1}} -e {{expression2}}`
|
|
|
|
|
|
|
|
|
|
- Display R version:
|
|
|
|
|
|
|
|
|
|
`Rscript --version`
|