getArg: An R-implementation of getting named aguments

Description Usage Arguments Details Value See Also

View source: R/getArg.R

Description

This function is out-dated. Please use argparse instead.

Usage

1
getArg(args, onlyArg = FALSE, missingArg = FALSE)

Arguments

args

Character strings, named arguments

onlyArg

Any type, What value should be returned if only the option is available and no value has been provided

missingArg

Any type, What value should be returned if the option is not available

Details

Options are those arguments with a leading minus sign. They can have one or more values following them, which will be taken as the value of the option. If no such values are availble, user could decide how to interpret the option by setting the onlyArg parameter. Similarly, missing options can be handled by missingArg

From version 1.0.3 onlyArg and missingArg accepts NULL as inputs.

Value

A list when more than one option were queried; or a vector if only one option was queried.

See Also

existArg


bedapub/ribiosArg documentation built on Nov. 4, 2021, 1:12 p.m.