optparse_numeric: optparse_numeric - define a command parameter as an numeric

View source: R/optparse_helper.R

optparse_numericR Documentation

optparse_numeric - define a command parameter as an numeric

Description

To be used with optparse_parameters. This function tells the provided parameter is to be parsed as an numeric.

Usage

optparse_numeric(help = "No documentation yet.", short = NULL, default = 0)

Arguments

help
  • The help string to display when –help is triggered

short
  • The shortcut fir this parameter. For example for a –output param, we could use optparse_flag(short = "-o", ...) to set the "-o" shortcut.

default
  • The default value this parameter will hold.

Author(s)

L.Pavot

See Also

optparse_parameters()

Examples


str(optparse_parameters(
  a_parameter = optparse_numeric(),
  args = list("--a-parameter", "42.72")
))


W4MRUtils documentation built on Sept. 8, 2023, 5:11 p.m.