50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

mkin (version 0.9.49.5)

geometric_mean: 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

Run this code
# NOT RUN {
  geometric_mean(c(1,3, 9))
  geometric_mean(c(1,3, NA))
  geometric_mean(c(1,3, NA), na.rm = TRUE)
# }

Run the code above in your browser using DataLab