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]] ______________________________________________ R-help@r-project.org 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.