Harmonic Mean

Share:

Description

Calculate the harmonic mean of a set of numbers.

Usage

1
harmonic.mean(x, na.rm = FALSE)

Arguments

x

a numeric vector.

na.rm

a logical value indicating whether NA values should be stripped before the computation proceeds.

Author(s)

Eric Archer eric.archer@noaa.gov

Examples

1
2
3
4
x <- rlnorm(100)
mean(x)
median(x)
harmonic.mean(x)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.