add.argument {argparser}R Documentation

Add an argument to a parser.

Description

This function is deprecated. Use add_argument instead.

Usage

add.argument(
  parser,
  arg,
  help,
  default = NULL,
  type = NULL,
  flag = NULL,
  short = NULL
)

Arguments

parser

an arg.parser object

arg

argument name (use no prefix for positional arguments, -- or - prefix for optional arguments or flags)

help

help description for the argument

default

default value for the argument [default: NA]

type

variable type of the argument (which can be inferred from default), assumed to be character otherwise

flag

whether argument is a flag (and does not consume a value) [default: FALSE]

short

short-form for flags and positional arguments; short-forms can be assigned automatically based on the first character of the argument name, unless a conflict arises with an existing short-form; to avoid conflicts, add the argument as early as possible

Value

an arg.parser object with the argument added


[Package argparser version 0.7.2 Index]