This function is used to check if the variable values are the same as the input values.
Usage
check_value_match(
values,
check_list,
excluded.na = TRUE,
stop_message = FALSE,
add_stop_message = NULL,
value_split = FALSE,
split_pattern = "\\||:|;"
)Arguments
- values
Existed variable values
- check_list
Vector of input values
- excluded.na
A Boolean to skip
NAfrom the existed variable valuesvalues, Default:TRUE- stop_message
A Boolean value to return a stop message if one of the existed values does not match with the check list, Default:
FALSE- add_stop_message
Additional text message that will be added in the stop message.
- value_split
A Boolean value whether to split the values with specified split pattern
split_pattern- split_pattern
Split string pattern. Only applicable if
value_split = TRUE
Value
TRUE: If all the existed variable values are matched with the input valuesFALSE: Otherwise and with a stop message ifstop_messageisTRUE
See also
Other checks function:
check_colnames(),
check_duplicate_records(),
check_non_missing_value(),
check_object_type(),
detect_decimal_value(),
detect_numeric_value(),
is_datadict_tbl()
