opt_get_args {optigrab} | R Documentation |
Arguments to a script are those following the --args
argument.
opt_get_args(opts = commandArgs())
opts |
character; vector of arguments, (Default: Returns the user provided arguments, i.e. those following (the first)
|
character; vector stripping elements preceding and
including (the first) --args
flag.
opt_get_args()
opt_get_args( opts=c( "Rscript", "-a", "-b", "--args", "-c", 3, "-d" ) ) # "-c" "3" "-d"
opt_get_args( opts=c( "-a", "-b", "--args", "-c", "--args", "-d" ) ) # "-c" "-d"
opt_get_args( opts=c( "--foo", "bar") )