geometricmean {compositions} | R Documentation |
Computes the geometric mean.
geometricmean(x,...) geometricmean.row(x,...) geometricmean.col(x,...)
x |
a numeric vector or matrix of data |
... |
further arguments to compute the mean |
The geometric mean is defined as:
geometricmean(x) := prod(x)^(1/length(x))
The geometric mean is actually computed by
exp(mean(log(c(unclass(x))),...))
.
The geometric means of x as a whole (geometricmean), its rows (geometricmean.row) or its columns (geometricmean.col).
geometricmean(1:10)