How can I set R options (e. g. options(keep.source = TRUE)
) individually for R scripts that I execute via Rscript
?
In the Rscript
docs I cannot find such a command line argument.
I want to run the same R script with different options.
My goal is to separate my R scripts and options (settings) and I want to avoid changing my R scripts manually to inject different options.
I have already tried using expressions and a file but this does not work:
Rscript --verbose -e "options(keep.source = TRUE)" my_script.R
It returns nothing and does not start my_script.R
.