geometricmean: The geometric mean
Description
Computes the geometric mean.Usage
geometricmean(x,...)
geometricmean.row(x,...)
geometricmean.col(x,...)Arguments
x
a numeric vector or matrix of data
...
further arguments to compute the mean
Value
- The geometric means of x as a whole (geometricmean), its rows
(geometricmean.row) or its columns (geometricmean.col).
Details
The geometric mean is defined as:
$$geometricmean(x) := \left( \prod_{i=1}^n x_i\right)^{1/n}$$
The geometric mean is actually computed by
exp(mean(log(c(unclass(x))),...)).