powered by
Computes the harmonic mean
ds_hmean(data, x = NULL)
A numeric vector or data.frame.
data.frame
Column in data.
data
Any NA values are stripped before computation. If any value is less than or equal to zero, a warning is issued and NA is returned.
NA
ds_gmean mean
ds_gmean
mean
# vector ds_hmean(mtcars$mpg) # data.frame ds_hmean(mtcars, mpg)
Run the code above in your browser using DataLab