Argument: Create an Argument class object

View source: R/Argument.R

ArgumentR Documentation

Create an Argument class object

Description

Create an Argument class object

Usage

Argument(name, flag = NULL, choices = NULL, default = NULL,
  required = FALSE, nargs = 1, action = "", type = "character",
  help = character())

Arguments

name

character name of the argument (required)

flag

character the pattern used to search the argument list, by default name

choices

a vector of the choices if limited to a listing

default

the default value if none provided

required

logical, set to TRUE is required otherwise it is optional

nargs

the number of arguments (maximum)

action

a function name or NULL

type

character, one of the following logical, character, integer, double, numeric, set_true, set_false set_true and set_false are logicals based upon presence/abscence such as –plot or –no-plot Alternatively, use 'logical' for "-plot TRUE" or "-plot FALSE" style booleans.

help

character vector of helpful hints

Value

an ArgumentRefClass object

See Also

Other Argument: ArgumentRefClass_getAction, ArgumentRefClass_get_usage, ArgumentRefClass_get, ArgumentRefClass_parse_argument, ArgumentRefClass_print_help, ArgumentRefClass_show, parseArgument


BigelowLab/rscripting documentation built on Oct. 24, 2022, 5:31 p.m.