[R] variables from command line
Martin Maechler
maechler at stat.math.ethz.ch
Thu Sep 8 11:15:48 CEST 2005
>>>>> "Omar" == Omar Lakkis <uofiowa at gmail.com>
>>>>> on Wed, 7 Sep 2005 10:47:43 -0400 writes:
Omar> How can I pass parameters to an R script from the
Omar> command line. And how can I read them from within the
Omar> script?
Omar> This is how I want to invoke the script: R CMD BATCH
Omar> r.in r.out <input values>
Omar> The script with read in the input values, process them
Omar> and spit the output to r.out.
I think commandArgs() should solve this.
Regard,
Martin Maechler
More information about the R-help
mailing list