tsutils (version 0.9.0)

geomean: Geometric mean

Description

Calculate the geometric mean.

Usage

geomean(x, na.rm = c(FALSE, TRUE), ...)

Arguments

x

input data (will be considered as a vector).

na.rm

a logical value indicating whether NA values should be stripped before the computation proceeds.

...

further arguments passed to or from other methods.

Value

The geometirc mean of the values in x.

Examples

Run this code
# NOT RUN {
geomean(c(0.5,1,1.5))

# }

Run the code above in your browser using DataLab