harmonic.mean {psych} | R Documentation |
The harmonic mean is merely the reciprocal of the arithmetic mean of the reciprocals.
harmonic.mean(x)
x |
a vector, matrix, or data.frame |
Included as an example for teaching about functions. As well as for a discussion of how to estimate central tendencies.
The harmonic mean(s)
Included as a simple demonstration of how to write a function
x <- seq(1,5) x2 <- x^2 harmonic.mean(x) harmonic.mean(x2)