a_hmean | R Documentation |
Weighted harmonic mean of a vector. NA
are skipped by default.
a_hmean(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 harMean()
from COINr < v1.0.
Weighted harmonic mean, as a numeric value.
# a vector of values
x <- 1:10
# a vector of weights
w <- runif(10)
# weighted harmonic mean
a_hmean(x,w)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.