match_arg: match arg to choices

Description Usage Arguments Value Author(s)

View source: R/tfse.match_arg.r

Description

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

Usage

1
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.

Author(s)

Michael Wayne Kearney


AlbanSagouis/myToolbox documentation built on Feb. 1, 2021, 1:08 p.m.