Generates nicely formatted command-line interfaces for functions (closures only).
enve.cliopts(
fx,
rd_file,
positional_arguments,
usage,
mandatory = c(),
vectorize = c(),
ignore = c(),
number = c(),
defaults = list(),
o_desc = list(),
p_desc = ""
)Returns a list with keys:
options, a named list with the values for the function's
arguments
args, a vector with zero or more strings containing the
positional arguments
Function for which the interface should be generated.
(Optional) .Rd file with the standard documentation of the function.
(Optional) Number of positional
arguments passed to parse_args
(package: optparse).
(Optional) Usage passed to OptionParser
(package: optparse).
Mandatory arguments.
Arguments of the function to vectorize (comma-delimited).
If numeric, use also number.
Arguments of the function to ignore.
Force these arguments as numerics. Useful for numeric
vectors (see vectorize) or arguments with no defaults.
Defaults to use instead of the ones provided by the formals.
Descriptions of the options. Help from rd is ignored
for arguments present in this list.
Description Description of the function. Help from rd
is ignored for the function description unless this value is an empty string.
Luis M. Rodriguez-R [aut, cre]