geo_mean | R Documentation |
Defined as: \loadmathjax \mjdeqn \left(\prod_i=1^n x_i\right)^\frac1n = \sqrt[n]x_1 x_2 \cdots x_n ASCII representation
geo_mean(x, na.rm = FALSE)
x |
Numeric |
na.rm |
Remove any |
Based heavily on the geoMean()
function in the EnvStats
package by alexkowa, and various
stackoverflow posts.
x <- rnorm(100, 1, 0.3)
geo_mean(x)
x <- c(x, NA)
geo_mean(x)
geo_mean(x, na.rm = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.