geomean: geomean

View source: R/CodeAndRoll2.R

geomeanR Documentation

geomean

Description

Calculates the geometric mean of a numeric vector (it excludes NA-s by default).

Usage

geomean(x, na.rm = TRUE)

Arguments

x

A numeric vector.

na.rm

Should NA values be removed before calculation? Defaults to TRUE.

Value

The geometric mean of the input vector.

Examples

geomean(1:5)


vertesy/CodeAndRoll2 documentation built on Nov. 20, 2024, 5:23 a.m.