This function checks for missing values in a data frame and prints out the names of the columns with missing values and their counts.

check_missing_values(df)

Arguments

df

A data frame to check for missing values.

Value

A message indicating if missing values were found or not.

Examples

df <- data.frame(w = c(7, 8, 180, 7), x = c("a", "b", "c", "a"),
                 y = c(4, 5, -6, 4), z = c(7, 8, NA, 7))
check_missing_values(df)
#> Missing values found in the following columns:
#> z: 1