Checks the spelling of a vector of entered variable(s) comparing it
to a vector of valid names, and removes the ones that are absent
from the vector of valid names.
Usage
check_names(variable, valid_vector)
Arguments
- variable
character()
containing the names of variables to
check.
- valid_vector
character()
with valid variable names.
Value
A character with valid variables.
Examples
CTexploreR:::check_names(
variable = c("Ovarian", "leukemia", "wrong_name"),
valid_vector = c("ovarian", "leukemia")
)
#> Warning: 2 out of 3 names invalid: Ovarian, wrong_name.
#> See the manual page for valid types.
#> [1] "leukemia"