ParserDef-class {defineOptions}R Documentation

ParserDef S4 class

Description

ParserDef object stores definitions of command line arguments and their parsing.

Details

Package users can create an object of ParserDef class using new_parser_def function. define_option function adds a new definition for command line parsing. parse_with_defs function parses command line arguments based on the definitions of ParserDef object. Each definition searches whether their options are specified or not. Each definition invokes their callbacks and processes specified input, or assign default input values if they are not specified. After callback execution, return value of characters are splitted by input_splitter if input_splitter is specified. Then, the value is cast into def_type. The result values are stored as an element of a list, and each element name is defined by def_name. Remaining arguments are treated as positional arguments.

See Also

new_parser_def define_option parse_with_defs defineOptions-package


[Package defineOptions version 0.9 Index]