Check the sum of a column or columns within a data frame.
Value
Logical value indicating whether the sum of column or columns specified by ... is equal to value.
Examples
library(sefraInputs)
x <- data.frame(a = 1:10, b = runif(10), z = runif(10))
B <- sum(x$b)
Z <- sum(x$z)
check_sum(x, B, b)
#> [1] TRUE
check_sum(x, B + Z, b, z)
#> [1] TRUE
check_sum(x, B + Z, b:z)
#> [1] TRUE