check_zero_columns.Rd
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)
A dataframe.
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)
#> Collection of 1 assertion.