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 NA from the existed variable values values, 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 values
- FALSE
Otherwise and with a stop message if
stop_message = TRUE
See also
Other checks function:
check_colnames()
,
check_duplicate_records()
,
check_is_logical()
,
detect_decimal_value()
,
detect_numeric_value()
,
is_datadict_tbl()