matchArg {checkmate} | R Documentation |
Partial Argument Matching
Description
This is an extensions to match.arg
with support for AssertCollection
.
The behavior is very similar to match.arg
, except that NULL
is not
a valid value for x
.
Usage
matchArg(x, choices, several.ok = FALSE, .var.name = vname(x), add = NULL)
Arguments
x |
[character] |
choices |
[character()] |
several.ok |
[logical(1)] |
.var.name |
[ |
add |
[ |
Value
Subset of choices
.
Examples
matchArg("k", choices = c("kendall", "pearson"))
[Package checkmate version 2.3.2 Index]