[R] force or "assert interactive use" with the --ess parameter in Windows

Daniel Sachse daniel.sachse at medisin.uio.no
Wed Jul 14 10:37:17 CEST 2010


Dear R community,

I have been perusing your mailing list (via Nabble) but have not been 
able to find a suitable solution yet.

First of all, my aim would be to run R (or Rterm or Rscript) 
interactively, while still being able to start the session with an 
R-script and command line parameters.

Kind of what "octave --persist" does, if there are Octave folks among you.

I have found out about

R CMD BATCH ...

where I can run scripts with arguments, but not in interactive mode, and 
have read about using environment variables like

R_PROFILE_USER

which would allow me to run a script at the beginning of an interactive 
session, but not to pass command line arguments.

Finally, I believe that the --ess option of R (the Windows equivalent of 
--interactive) might be what I am looking for, but it seems to have no 
effect at all:

C:\Program Files\R\R-2.11.1\bin>R.exe --slave -e "print(interactive());"
[1] FALSE

C:\Program Files\R\R-2.11.1\bin>R.exe --slave --ess -e 
"print(interactive());"
[1] FALSE


I am seriously confused. Is there no such thing as

"R --persist MyScript.R myarg1 myarg2"

that would run MyScript interactively?

Thanks for your time,
Daniel



More information about the R-help mailing list