Description Usage Arguments Value Source Examples
This is a function taken from the blog Statistics on aiR that calculates the harmonic mean of a set of numbers. Along with the gm_mean
and mean
it provides the three most basic functions of "average." Typically, the arithmetic mean should be used for linear relationships, the geometric mean should be used for exponential or multiplicative relationships, and the harmonic mean should be used for reciprocal relationships.
1 | h_mean(x)
|
x |
The quantitative field from which to calculate the harmonic mean. |
Returns a numeric which is the harmonic mean
1 | ## Not run: h_mean(mtcars$mpg)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.