Learn R Programming

scribe (version 0.3.0)

command_args: 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
)

Value

A scribeCommandArgs object

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.

See Also

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

Examples

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

Run the code above in your browser using DataLab