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. |
numeric value representing the geometric mean of input values
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.
Other jam numeric functions:
jamGeomean()
#> [1] 2.828427#> Warning: NaNs produced#> [1] NaN#> [1] 0