a positive numeric vector. An object which is not a vector is coerced (if possible) by as.vector.
na.rm
logical, indicating whether NA values should be stripped before the computation proceeds. Defaults to FALSE.
Value
a numeric value.
Details
If any argument is negative, then the result will be NA.
If any argument is zero, then the harmonic mean is zero. Otherwise, the harmonic mean is the reciprocal of the arithmetic mean of the reciprocals of the values.
Use sapply to calculate the measures from data frame, resp. from a matrix.