powered by
Computes the geometric mean
ds_gmean(data, x = NULL)
A numeric vector or data.frame.
data.frame
Column in data.
data
Any NA values are stripped before computation. The mean is computed on the log scale, so large values or long vectors do not overflow. If any value is less than or equal to zero, a warning is issued and NA is returned.
NA
ds_hmean mean
ds_hmean
mean
# vector ds_gmean(mtcars$mpg) # data.frame ds_gmean(mtcars, mpg)
Run the code above in your browser using DataLab