geomean | R Documentation |
Returns the geometric mean of a vector of numbers, which is the nth root of their product.
geomean(x, na.rm = FALSE)
x |
Vector of numbers, required. |
na.rm |
Logical value, optional, FALSE by default. If FALSE, result is NA if any of the values in x is NA. If TRUE, remove the NA values first. |
The geomean is one type of average, used in working with lognormal distributions, for example. Is not as strongly influenced by extreme outliers as the arithmetic mean. See http://en.wikipedia.org/wiki/Geometric_mean for many applications.
Returns a single number that is the geometric mean of the numbers in x.
harmean()
mean()
rms()
geomean(c(4,9)) # is the square root of 4 * 9
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.