Skip to contents

Computes the harmonic mean

Usage

ds_hmean(data, x = NULL)

Arguments

data

A numeric vector or data.frame.

x

Column in data.

See also

Examples

# vector
ds_hmean(mtcars$mpg)
#> [1] 18.44092

# data.frame
ds_hmean(mtcars, mpg)
#> [1] 18.44092