Make a new scribeCommandArgs object
Arguments
- x, string
Command line arguments; see
base::commandArgs()for default. At least one parameter has to beNULL. WhenstringisNULL,xis used, which defaults tocommandArgs(trailingOnly = TRUE). Otherwise the value ofxis converted to acharacter. Ifstringis notNULL,scan()will be used to split the value into acharactervector.- include
Special default arguments to included. See
$initialize()in scribeCommandArgs for more details.- super
When
TRUEthe scribeCommandArgs object will be initialized with standard super arguments (e.g.,---help,---version)
Value
A scribeCommandArgs object
See also
Other scribe:
new_arg(),
scribeArg-class,
scribeCommandArgs-class
Examples
command_args()
#> Initial call:
#> w Call $resolve() or $parse() to resolve arguments
#> Argument [--help] : FALSE
#> Argument [--version] : FALSE
command_args(c("-a", 1, "-b", 2))
#> Initial call: -a 1 -b 2
#> w Call $resolve() or $parse() to resolve arguments
#> Argument [--help] : FALSE
#> Argument [--version] : FALSE
command_args(string = "-a 1 -b 2")
#> Initial call: -a 1 -b 2
#> w Call $resolve() or $parse() to resolve arguments
#> Argument [--help] : FALSE
#> Argument [--version] : FALSE