Learn R Programming

RImpact (version 1.0)

HarmonicMean: HarmonicMean

Description

Calculates the harmonic mean (the reciprocal of the arithmetic mean of the reciprocals of n values).

Usage

HarmonicMean(x)

Arguments

x

Vector of n values whose harmonic mean is to be calculated.

Value

The harmonic mean of x.

References

Ruscio et al. (2012)

Examples

Run this code
# NOT RUN {
HarmonicMean(c(1, 3, 9, 27, 81))
# }

Run the code above in your browser using DataLab