geometricmean {compositions}R Documentation

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

Details

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))),...)).

Value

The geometric means of x as a whole (geometricmean), its rows (geometricmean.row) or its columns (geometricmean.col).

See Also

mean.rplus

Examples

geometricmean(1:10)


[Package compositions version 0.9-10 Index]