Learn R Programming

tbrf (version 0.1.5)

gm_mean: 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)

Value

the geometric mean of the vector

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.