CheckRowSums: Checks that evey row sums 'total'

Usage Arguments Value Examples

View source: R/CheckRowSums.R

Usage

1
CheckRowSums(x, total = 100, cols = NULL)

Arguments

x

data.frame or matrix

total

The true total value.

cols

integer vector with the columns of x to be checked.

Value

a logical vector with TRUE in the rows wich are equal to total

Examples

1
2
3
CheckRowSums(iris[1:5,1:3], total = 10)
CheckRowSums(iris[1:5,1:3], total = 10, cols = c(1,2))
CheckRowSums(iris[1:5,1:3], total = rowSums(iris[1:5,1:3]))

mathphysmx/cleanTable documentation built on May 29, 2019, 2:51 p.m.