do_check(
df,
v_vars,
check,
label_check,
template_ok = "all variables are {label_check}",
template_fail = "{var} is not {label_check}"
)
Value
List containing the results of the check (checks), and a tibble
of status and message for each test (messages).
The list of messages in the result contains a single line if the test passed,
or if a test failed for one or more variables, a line for each failure.
Arguments
df
a dataframe.
v_vars
character vector of variables on which to apply the test.
check
a function to apply to the `vars`.
label_check
character string. Text describing the test to pass.
template_ok
character string. Text to display when a test is passed by a variable.
template_fail
character string. Text to display when a test is not passed by a variable.