Think about Loose Coupling | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
That works fine, but there's a slightly neater way to do it; if you provide a TRUE value to the commandArgs function, it ignores any commandline parameters before (and including) --args.
So with Args <- commandArgs(TRUE), Args[1] is "100", and is the only element of the vector. It's also possible to use a simpler syntax to call the script on the command line, which implicitly assumes that any arguments are given after the script name: Rscript test.R 100 Cheers, Julio In reply to Re^3: Passing parameters to R script
by Anonymous Monk
|
|