Helper function to compute the geometric mean. The geometric mean is the nth
root of n products.
Usage
gm_mean(x, ..., na.rm = TRUE)
Arguments
x
A numeric vector or a data frame.
...
Variables to compute the geometric mean. If no variable is informed
and x is a data frame, all the numeric variables will be used.
na.rm
A logical value indicating whether NA values should be
stripped before computation proceeds.
Value
The geometric mean(s) of x. If x is a numeric vector, the
function returns a numeric value. If a data frame is used then a numeric
vector with the geometric mean for each variable is returned.