command_args {scribe}R Documentation

Command line arguments

Description

Make a new scribeCommandArgs object

Usage

command_args(
  x = NULL,
  include = getOption("scribe.include", c("help", "version", NA_character_)),
  string = NULL
)

Arguments

x, string

Command line arguments; see base::commandArgs() for default. At least one parameter has to be NULL. When string is NULL, x is used, which defaults to commandArgs(trailingOnly = TRUE). Otherwise the value of x is converted to a character. If string is not NULL, scan() will be used to split the value into a character vector.

include

Special default arguments to included. See ⁠$initialize()⁠ in scribeCommandArgs for more details.

Value

A scribeCommandArgs object

See Also

Other scribe: new_arg(), scribeArg-class, scribeCommandArgs-class

Examples

command_args()
command_args(c("-a", 1, "-b", 2))
command_args(string = "-a 1 -b 2")

[Package scribe version 0.3.0 Index]