View source: R/ACutils_export.R
sum_check | R Documentation |
sum_check check if elements in a vector sum to an expected value. Elements of the vector are supposed to be computed as expected_sum*p. If expectations are not respected return a corrected version of vec, according to p
sum_check(vec, expected_sum, p)
vec |
vector to integer value to be checked |
expected_sum |
expected value for sum(vec) |
p |
theoretical weights applied to divide expected_sum in vec's elements |
corrected version of vec (if needed)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.