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

Daniel Sachse daniel.sachse at medisin.uio.no
Thu Jul 15 10:33:18 CEST 2010


That is quite sad.

On 15.07.2010 10:12, Allan Engelhardt wrote:
> On 14/07/10 09:37, Daniel Sachse wrote:
>> [...]
>>
>> I am seriously confused. Is there no such thing as
>>
>> "R --persist MyScript.R myarg1 myarg2"
>>
>> that would run MyScript interactively?
> 
> In a word: no.
> 
> Depending on what you are really trying to do, you may find source() 
> useful from within a R session.
> 
> Allan

I even got far enough as to get R to execute a command and stay 
interactive with

C:\...\bin>echo print(interactive()) | R --ess --slave
[1] TRUE

So, in the same way I could also start sourcing an arbitrary .R-file 
right from the command line.

However, R still terminates the session after running the command piped 
  to it.

Do I really have to launch R and then manually type s-o-u-r-c-e- etc. in 
order to start my programs?

Regards,
Daniel



More information about the R-help mailing list