check_na_columns.Rd
This function checks if there are any columns in the provided dataframe that contain only NA values. If such columns exist, their names are added to the provided collection.
check_na_columns(df, collection)
A dataframe.
A list to store the names of the columns with only NA values.
The updated collection.
# Create a dataframe with some columns containing only NA values
df <- data.frame(a = c(1, NA, 3), b = c(NA, NA, NA), c = c(4, 5, 6))
collection <- checkmate::makeAssertCollection()
check_na_columns(df, collection)
#> Collection of 1 assertion.