R/stat.R
percentageOfSum.Rd
Percentage of the Sum of Values
percentageOfSum(x, na.rm = TRUE)
vector of numeric values
passed to max
max
100 * x / sum(x)
p <- percentageOfSum(1:10) stopifnot(sum(p) == 100)