add_up_to: Do reported counts add up to their total?
Description
add_up_to() checks whether reported subgroup sizes, or other
counts, sum to the reported total.
The function is vectorized over cases, but add_up_to_map() is more
convenient for testing many cases.
Usage
add_up_to(summands, total)
Value
Logical. TRUE if the counts add up to total, FALSE if not,
and NA if a value is missing, negative, or not a whole number, or if their
sum or the total reaches 2^53, beyond which a sum is no longer exact.
Arguments
summands
Integer. The counts of one case, or a list with one such
vector per case.