a_gmean {COINr} | R Documentation |
Weighted geometric mean of a vector. NA
are skipped by default.
a_gmean(x, w = NULL)
x |
A numeric vector of positive values. |
w |
A vector of weights, which should have length equal to |
This function replaces the now-defunct geoMean()
from COINr < v1.0.
The geometric mean, as a numeric value.
# a vector of values
x <- 1:10
# a vector of weights
w <- runif(10)
# weighted geometric mean
a_gmean(x,w)