[R] how to run a script at the beginning of an interacive session ?

Mike R mike.rstat at gmail.com
Wed Jun 8 04:37:53 CEST 2005


Hi All,

How does one create an executable R-script, similar
to an executable python script, or shell script except 
that when the R-script is finished, the R session remains
open and becomes interactive.

If I do this:

  R < script.r

then R exits when finished.

On the other hand, starting R then typing 

   source("script.r",echo=T)

is becoming tedious.

Thanks in advance.

Mike




More information about the R-help mailing list