geomean: geomean log-normal bias corrected geometric mean of a vector

View source: R/rutils.R

geomeanR Documentation

geomean log-normal bias corrected geometric mean of a vector

Description

Calculates log-normal bias corrected geometric mean of a vector. NAs and zeros are removed from consideration. If a vector of length zero is entered then geomean returns 0.

Usage

geomean(invect = NULL)

Arguments

invect

is a vector of numbers in linear space.

Value

The bias-corrected geometric mean of the vector

Examples

 x <- c(1,2,3,4,5,6,7,8,9)
 geomean(x)
 geomean(c(NA,0,NA,0))
 geomean()

haddonm/codeutils documentation built on April 15, 2024, 1:02 p.m.