View source: R/return_assertions_message.R
check_zero_columns | R Documentation |
This function checks if there are any columns in the provided dataframe that contain only 0 values. If such columns exist, their names are added to the provided collection.
check_zero_columns(dataframe, collection)
dataframe |
A dataframe. |
collection |
A list to store the names of the columns with only 0 values. |
The updated collection.
# Create a dataframe with some columns containing only 0 values
dataframe <- data.frame(a = c(0, 0, 0), b = c(1, 2, 3), c = c(0, 0, 0))
collection <- checkmate::makeAssertCollection()
check_zero_columns(dataframe, collection)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.