Check for empty columns in the data and warn (or fail) if present.
The function takes in a list of required column names that are
not tested for emptiness. This is due to the existing function
check_cols_complete(), which ensures that the required columns are
complete. By ignoring the required columns in
there are no duplicated results for the same column in the event
that a required column was also empty.
check_cols_empty( data, empty_values = c(NA, ""), required_cols = NULL, strict = FALSE, success_msg = "No columns are empty", fail_msg = "Some columns are completely empty" )
Data to check
Values that are considered empty. Defaults to
A character vector of the required columns to check for completeness.
Message indicating the check succeeded.
Message indicating the check failed.
A condition object indicating whether the data contains columns that are empty.
#> <check_warn: Some columns are completely empty>