Computes the harmonic mean
ds_hmean(x, data = NULL, na.rm = FALSE, ...)
x | a numeric vector. |
---|---|
data | a |
na.rm | a logical value indicating whether NA values should be stripped before the computation proceeds. |
... | further arguments passed to or from other methods |
ds_hmean(mtcars$mpg)#> [1] 18.44092ds_hmean(mpg, mtcars)#> [1] 18.44092