powered by
Calculate harmonic mean
harmonic_mean(.x)
A single numeric value
A numeric to take the harmonic mean of
The calculation of the harmonic mean is as follows: $$ n\frac{1}{\sum_{i=1}^n \frac{1}{x_i}} $$
NAs are removed before calculation
NA
beadplexr:::harmonic_mean(runif(10))
Run the code above in your browser using DataLab