powered by
Calculate the harmonic mean of a set of numbers.
harmonic.mean(x, w = NULL, na.rm = FALSE)
a numeric vector.
an optional numerical vector of weights the same length as x.
x
a logical value indicating whether NA values should be stripped before the computation proceeds.
Eric Archer eric.archer@noaa.gov
x <- rlnorm(100) mean(x) median(x) harmonic.mean(x)
Run the code above in your browser using DataLab