Description Usage Arguments Value See Also Examples
Arguments to a script are those following the --args
argument.
1 | 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.
base::commandArgs()
opt_grab()
1 2 3 4 5 | 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") )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.