Make a new scribeCommandArgs object
Usage
command_args(
x = commandArgs(trailingOnly = TRUE),
include = getOption("scribe.include", c("help", "version", NA_character_)),
super = include,
string
)Arguments
- x
Command line arguments as a character vector. Use
I()to pass a single (combined) string of arguments.- 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)- string
Deprecated. Use
command_args(I())to pass a single string of arguments.
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(I("-a 1 -b 2"))
#> Initial call: -a 1 -b 2
#> w Call $resolve() or $parse() to resolve arguments
#> Argument [--help] : FALSE
#> Argument [--version] : FALSE