util_match_arg: 'dataquieR' version of match.arg

View source: R/util_match_arg.R

util_match_argR Documentation

dataquieR version of match.arg

Description

does not support partial matching, but will display the most likely match as a warning/error.

Usage

util_match_arg(arg, choices, several_ok = FALSE, error = TRUE)

Arguments

arg

the argument

choices

the choices

several_ok

allow more than one entry in arg

error

stop(), if arg is not in choices (warns and cleans arg, otherwise)

Value

"cleaned" arg

See Also

Other robustness_functions: util_as_valid_missing_codes(), util_check_one_unique_value(), util_correct_variable_use(), util_empty(), util_ensure_character(), util_ensure_in(), util_ensure_suggested(), util_expect_scalar(), util_fix_rstudio_bugs(), util_is_integer(), util_is_numeric_in(), util_is_valid_missing_codes(), util_observations_in_subgroups(), util_only_NAs(), util_stop_if_not(), util_warn_unordered()


dataquieR documentation built on May 29, 2024, 7:18 a.m.