geometric_mean: Calculate geometric mean

View source: R/analyte_mfi.R

geometric_meanR Documentation

Calculate geometric mean

Description

Calculate geometric mean

Usage

geometric_mean(.x)

Arguments

.x

A numeric to take the geometric mean of

Value

A single numeric value

Mean calculation

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

Examples

beadplexr:::geometric_mean(runif(10))


beadplexr documentation built on July 9, 2023, 5:59 p.m.