Skip to contents

Compute geometric mean of a vector using exp(mean(log(.x))) format

Usage

gmean(vec)

Arguments

vec

A vector of values with length n

Value

A numeric value of the geometric mean of the vector vec

Examples

ex <- abs(rnorm(10))
gmean(ex)
#> [1] 0.7043728