ArgumentRefClass-class: ArgumentRefClass to manage one argument

ArgumentRefClass-classR Documentation

ArgumentRefClass to manage one argument

Description

ArgumentRefClass to manage one argument

Fields

name

the name of the argument - typically the name provided in the argument string

flag

the characater string used to search for the argument. By default the name, prepended by -- or -. Allowing name and flag to be different is to allow the user to specify a name like 'bosworth' for an argumeent flagged as '-b'

value

the parsed argument value as a list.

choices

a list of allowable argument values (like having a dropdown list)

nargs

the number of expected arguments, by default 1

required

logical - must the user provide a value?

type

charcater specifies the type of argument. Allowed values are

logical

Explicitly set TRUE/FALSE arguments

set_true

For arguments set by presence ala –plot

set_false

For argument set by presence ala –no-plot

character

For character arguments

numeric

For numeric arguments ala integers and doubles

integer

For explictly integer numerics

double

For explictly double precision numerics

action

the name of a function to call with the argument

default

the optional default value

help

a character vector of help text


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