add.argument: Add an argument to a parser.

Description Usage Arguments Value

View source: R/deprecated.R

Description

This function is deprecated. Use add_argument instead.

Usage

1
2
3
4
5
6
7
8
9
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


argparser documentation built on March 8, 2021, 9:07 a.m.