Hi,

Suppose that I have the following script.

$ cat commandArgs.R
args=commandArgs(trailingOnly=TRUE)
args[1]

I can supply command line options

$ Rscript commandArgs.R a
> args=commandArgs(trailingOnly=TRUE)
> args[1]
[1] "a"
>

I am wondering how to supply the command line arguments when I source the
code. The following way is of course not working.

> source("commandArgs.R a")

Regards,
Peng

	[[alternative HTML version deleted]]


