geomean: Calculate the geometric mean of a numeric vector

View source: R/geomean.R

geomeanR Documentation

Calculate the geometric mean of a numeric vector

Description

Calculate the geometric mean of a numeric vector, passing arguments on to mean.

Usage

geomean(x, ...)

Arguments

x

numeric vector. All elements must be positive, or an error is thrown. Geometric mean is defined only where all elements are positive.

...

optional arguments, passed to mean. na.rm is particularly useful.

Value

numeric, the value of the geometric mean


mjdufort/miscHelpers documentation built on Feb. 4, 2024, 7:44 p.m.