This function checks if any column in a data frame contains values that are not part of a given set of totals.
Examples
if (FALSE) { # \dontrun{
df <- data.frame(
col1 = c("A", "B", "TOTAL"),
col2 = c("X", "TOTAL", "TOTAL")
)
contains_non_total(df, c("TOTAL"))
# Returns TRUE
} # }