Last data update: 2014.03.03

R: Calculate the geometric mean
geometric_meanR Documentation

Calculate the geometric mean

Description

Function calculating the geometric mean of numeric vectors

Usage

  geometric_mean(x, na.rm = FALSE)

Arguments

x

A numeric vector

na.rm

Should NA values be ignored

Value

The geometric mean.

Examples

  geometric_mean(c(1,3, 9))
  geometric_mean(c(1,3, NA))
  geometric_mean(c(1,3, NA), na.rm = TRUE)

Results