gm_mean: Calculates the Geometric Mean

View source: R/tbr_gmean.R

gm_meanR Documentation

Calculates the Geometric Mean

Description

Originally from Paul McMurdie, Ben Bolker, and Gregor on Stack Overflow: https://stackoverflow.com/questions/2602583/geometric-mean-is-there-a-built-in

Usage

gm_mean(x, na.rm = TRUE, zero.propagate = FALSE)

Arguments

x

vector of numeric values

na.rm

logical TRUE/FALSE remove NA values

zero.propagate

logical TRUE/FALSE. Allows the optional propagation of zeros.

Value

the geometric mean of the vector


mps9506/tbrf documentation built on May 20, 2022, 10:49 a.m.