percentageOfSum | R Documentation |
Percentage of the Sum of Values
percentageOfSum(x, na.rm = TRUE)
x |
vector of numeric values |
na.rm |
passed to |
100 * x / sum(x)
p <- percentageOfSum(1:10)
stopifnot(sum(p) == 100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.