[R] BATCH processing in R

Terry Westley twestley at buffalo.veridian.com
Thu Sep 2 00:18:32 CEST 1999

> On Wed, 1 Sep 1999, Laura Drake wrote:
> My question is whether it is possible (and if so, how) to enter values
> into R vectors (R_OUTFILE, and R_INFILE in my example below) from the
> command line.  In particular, I would like to run R, as a BATCH job,
> from a shell script, such as the following:

> On Wed, 1 Sep 1999, Thomas Lumley wrote:
> yes. Use getenv()

An alternative method is to create a file named .Rprofile which
contains initialization code, then call the R script.  Example:

echo "R.OUTFILE <- \"$outputfile_name\"" >  .Rprofile
echo "R.INFILE  <- \"$inputfile_name\""  >> .Rprofile
R BATCH infile.R

Terry J. Westley, Software Systems Engineering Supervisor
Veridian Engineering, Calspan Operations
P.O. Box 400, Buffalo, NY 14225
twestley at buffalo.veridian.com    http://www.veridian.com

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

More information about the R-help mailing list