Make a new scribeCommandArgs object
Arguments
- x, string
Command line arguments; see
base::commandArgs()
for default. At least one parameter has to beNULL
. Whenstring
isNULL
,x
is used, which defaults tocommandArgs(trailingOnly = TRUE)
. Otherwise the value ofx
is converted to acharacter
. Ifstring
is notNULL
,scan()
will be used to split the value into acharacter
vector.- include
Special default arguments to included. See
$initialize()
in scribeCommandArgs for more details.- super
When
TRUE
the 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