geomean | R Documentation |
Classical geometric mean
geomean(x, na.rm = TRUE, naValue = NA, offset = 0, ...)
x |
numeric vector containing only positive values |
na.rm |
logical indicating whether to ignore |
offset |
numeric value added to input |
... |
additional parameters are ignored. |
This function calculates the classical geometric mean.
The classical geometric mean is defined as
the exponentiated mean of log-transformed values. Said another
way, it is the n
th root of the product of n
numeric values.
This formula is analogous to geometric distance. The formula
does not allow negative values, however, and if any value is
zero the result is also zero.
numeric value representing the geometric mean of input values
Other jam numeric functions:
jamGeomean()
x <- c(2, 4);
geomean(x);
x <- c(-2, 2, 4);
geomean(x);
x <- c(0, 4000, 200000);
geomean(x);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.