check_zero_columns {vvauditor}R Documentation

Check for Columns with Only 0s

Description

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.

Usage

check_zero_columns(dataframe, collection)

Arguments

dataframe

A dataframe.

collection

A list to store the names of the columns with only 0 values.

Value

The updated collection.

Examples

# 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)

[Package vvauditor version 0.6.0 Index]