Description Usage Arguments Value Source Examples
This is a function taken from the blog Stack Overflow that calculates the geometric mean of a set of numbers. Along with the h_mean
and mean
functions, they provide 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 |
x |
The quantitative field from which to calculate the geometric mean. |
Returns a numeric which is the geometric mean
1 | ## Not run: gm_mean(mtcars$mpg)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.