powered by
Calculate geometric mean
geometric_mean(.x)
A single numeric value
A numeric to take the geometric mean of
The geometric mean is given by:
$$ \left(\prod_{i=1}^n x_i \right)^\frac{1}{n} $$
but implemented as:
$$ \frac{1}{n}\exp{\sum_{i=1}^n\log(x_i)} $$
NAs are removed before calculation
NA
beadplexr:::geometric_mean(runif(10))
Run the code above in your browser using DataLab