ArgumentRefClass-class | R Documentation |
ArgumentRefClass to manage one argument
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
Explicitly set TRUE/FALSE arguments
For arguments set by presence ala –plot
For argument set by presence ala –no-plot
For character arguments
For numeric arguments ala integers and doubles
For explictly integer numerics
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.