tsutils (version 0.9.4)

geomean: Geometric mean

Description

Calculate the geometric mean.

Usage

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

Value

The geometirc mean of the values in x.

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.

Author

Nikolaos Kourentzes, nikolaos@kourentzes.com.

Examples

Run this code
geomean(c(0.5,1,1.5))

Run the code above in your browser using DataLab