Similar to match.arg(), match_arg matches arg against a table of candidate values as specified by choices.
Arguments
- arg
a character vector (of length one unless
several.okisTRUE) orNULLwhich means to takechoices[1].- choices
a character vector of candidate values, often missing, see ‘Details’.
- several.ok
logical specifying if
argshould be allowed to have more than one element.
Details
This function resolves errors from match.arg() with '' as arg input.
