mean_geometric: Function to calculate the geometric mean of a numeric vector.

View source: R/mean_geometric.R

mean_geometricR Documentation

Function to calculate the geometric mean of a numeric vector.

Description

Function to calculate the geometric mean of a numeric vector.

Usage

mean_geometric(x, na.rm = FALSE)

Arguments

x

Numeric vector.

na.rm

Should NAs be removed from the summary?

Value

Numeric vector with a length of one.

Author(s)

Stuart K. Grange and Steven P. Millard.

See Also

https://github.com/cran/EnvStats/blob/master/R/geoMean.R.

Examples


mean_geometric(sample(1:500, size = 10))


skgrange/threadr documentation built on May 11, 2024, 12:16 p.m.