The harmonic mean is the reciprocal of the arithmetic mean of the reciprocals of a set of observations. It is a more robust measure of central tendency than the arithmetic mean in the presence of outliers since it tends to the smallest elements of a set of observations.
Examples
d <- rlnorm(60,1,1.4)
harm.mean(d)
#> [1] 1.173035
x <- matrix(rlnorm(60,1,1.4),ncol = 4)
mapply(harm.mean, as.data.frame(x))
#> V1 V2 V3 V4
#> 0.3281170 3.2186557 1.2562412 0.9474592