contains_non_total: Check for Non-Total Values in a Data Frame

View source: R/format_template.R

contains_non_totalR Documentation

Check for Non-Total Values in a Data Frame

Description

This function checks if any column in a data frame contains values that are not part of a given set of totals.

Usage

contains_non_total(data, totals)

Arguments

data

A data frame containing the data to be checked.

totals

A vector of values considered as totals.

Value

A logical value: TRUE if at least one non-total value exists, otherwise FALSE.

Examples

## Not run: 
df <- data.frame(
  col1 = c("A", "B", "TOTAL"),
  col2 = c("X", "TOTAL", "TOTAL")
)
contains_non_total(df, c("TOTAL"))
# Returns TRUE

## End(Not run)


InseeFrLab/rtauargus documentation built on Feb. 25, 2025, 6:32 a.m.