matchArg: Argument verification if there might be an "all" option

Description Usage Arguments Value

View source: R/utilities.R

Description

matchArg is a wrapper around match.arg to check arguments which have an "all" option in their choices. Note that the defaults are not the same as in match.arg.

Usage

1
matchArg(arg, choices = NULL, several_ok = TRUE)

Arguments

arg

a character vector (of length one unless several_ok is TRUE) or NULL

choices

a character vector of candidate values (if NULL [default], it is deduced from the formals of the calling function)

several_ok

logical specifying whether arg should be allowed to have more than one element (default: TRUE)

Value

If 'arg' has an element 'all' (or 'ALL', 'All', etc.), all other choices are returned. Otherwise see match.arg.


tdeenes/eegR documentation built on April 19, 2021, 4:17 p.m.