[R] commandArgs usage and --args invokation

From: ivo welch <ivowel_at_gmail.com>
Date: Sun 01 Apr 2007 - 01:51:01 GMT


Dear R experts:

I am a bit stymied by how the argument picking-off works in R batch file usage.

$ cat commandArgs.R

cat(" Command Line Arguments were ", commandArgs(), "\n");

$ /usr/bin/R CMD BATCH commandArgs.R --args 1 2 3

$ /usr/bin/R --args 1 CMD BATCH commandArgs.R
... I am now getting into interactive mode ?! I guess it really is skipping the rest of the command line

$ /usr/bin/R CMD BATCH commandArgs.R --args 1

$ ls -lt | head

total 1628148
-rw-rw-r-- 1 ivo ivo 827 Mar 31 21:47 --args ...

Could someone please let me know?

[also, are there multi-core versions of R? my guess is no, but since I have a second processor lying around, I am trying to get it into the fray.]

A working example would be appreciated.

regards,

/ivo welch



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Sun Apr 01 11:53:44 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sun 01 Apr 2007 - 15:30:34 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.