This function checks if a specified column in a data frame contains either NA or empty values.
validate_na_empty(df, col_name, verbose = TRUE)
A data frame.
A character string specifying the name of the column to check.
A logical indicating whether to print informative messages. Default is TRUE.
Number of issues
df <- data.frame(A = c("a", "", NA, "d"), B = 1:4)
validate_na_empty(df, "A")
#> - (-) NA values detected in column ` A `: FAIL
#> - (-) Empty values detected in column ` A `: FAIL
#> [1] 2