Skip to content
Prev 12438 / 398502 Next

Write a script

I'm sure there are many ways to do this, but one is to write the
script, say myscript.R, just as a list of R commands, and then
write, on the command line:

R --vanilla < myscript.R

See the bottom of http://finzi.psych.upenn.edu/~baron/
for a couple of examples.  The "vanilla" prevents R from reading
various files, which, if they run, will lead it to present
various prompts, etc.  (See R --help for details.)

Jon Baron
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._