Rscript --vanilla -e 'print(1+1)'

Category: Data Science & Analysis

Rscript --vanilla -e 'print(1+1)'

Run R code without loading startup files

The --vanilla flag disables loading .Rprofile and site startup files, restoring packages, and saving the workspace, giving a clean, reproducible environment. Startup files can otherwise change behavior between machines. This flag is recommended for scripts and cron jobs where reproducibility matters. The code itself is a trivial arithmetic check.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.