View source: R/return_assertions_message.R
check_na_columns | R Documentation |
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)
df |
A dataframe. |
collection |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.