geometric_mean {mkin}R 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)

[Package mkin version 0.9.47.1 Index]