Wrapper around match.arg that defaults to ignoring case and trimming white space

match_arg(arg, choices, multiple = FALSE, ignore_case = TRUE,
  trim_ws = TRUE)

Arguments

arg

a character vector (of length one unless several.ok is TRUE) or NULL

choices

a character vector of candidate values

multiple

logical specifying if arg should be allowed to have more than one element. Defaults to FALSE

ignore_case

logical indicating whether to ignore capitalization. Defaults to TRUE

trim_ws

logical indicating whether to trim surrounding white space. Defaults to TRUE

Value

Value(s) matched via partial matching.