How can I read command line parameters from an R script?
Dirk’s answer here is everything you need. Here’s a minimal reproducible example. I made two files: exmpl.bat and exmpl.R. exmpl.bat: set R_Script=”C:\Program Files\R-3.0.2\bin\RScript.exe” %R_Script% exmpl.R 2010-01-28 example 100 > exmpl.batch 2>&1 Alternatively, using Rterm.exe: set R_TERM=”C:\Program Files\R-3.0.2\bin\i386\Rterm.exe” %R_TERM% –no-restore –no-save –args 2010-01-28 example 100 < exmpl.R > exmpl.batch 2>&1 exmpl.R: options(echo=TRUE) # if you want … Read more