geoMean | R Documentation |
Geometric mean, with optional removal of NA
's and propagation of zeros.
geoMean(x, prop0 = FALSE, na.rm = TRUE)
x |
Numeric list. |
prop0 |
Logical, if |
na.rm |
Logical, if |
Adapted from Paul McMurdie on StackOverflow.
Numeric.
x <- seq(0.01, 1, by=0.01)
mean(x)
geoMean(x)
x <- seq(0, 1, by=0.01)
mean(x)
geoMean(x)
geoMean(x, prop0=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.