gm_mean: Geometric mean

View source: R/helper_functions.R

gm_meanR Documentation

Geometric mean

Description

Calculate the geometric mean of a vector of numbers

Usage

gm_mean(x, na.rm = TRUE)

Arguments

x

an R numerical object

na.rm

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

Value

If all values in x are numeric class, a single numeric class value is returned.

Examples

x <- c(0:10, 50)
gm_mean(x)


multilateral documentation built on April 20, 2022, 9:06 a.m.