Computes the geometric mean

ds_gmean(x, data = NULL, na.rm = FALSE, ...)

Arguments

x

a numeric vector

data

a data.frame or tibble

na.rm

a logical value indicating whether NA values should be stripped before the computation proceeds.

...

further arguments passed to or from other methods

See also

Examples

ds_gmean(mtcars$mpg)
#> [1] 19.25006
ds_gmean(mpg, mtcars)
#> [1] 19.25006