gm_mean: Calculate the geometric mean

View source: R/gm_mean.R

gm_meanR Documentation

Calculate the geometric mean

Description

Calculates the geometric mean of a numeric vector

Usage

gm_mean(x, na.rm = TRUE)

Arguments

x

A numeric vector

na.rm

Logical (default TRUE). Should NA values be ignored in this calculation? If FALSE, a vector containing NA values will return a geometric mean of NA.

Value

The geometric mean

Examples

gm_mean(c(1, 3, 5))

calebclass/NanoTube documentation built on Nov. 21, 2023, 12:31 p.m.