geom_mean(x, na.rm = TRUE)
Arguments
- x
(numeric)
numeric vector. Non-positive values are ignored.
- na.rm
(logical(1))
whether to remove NA values. Default is TRUE.
Value
A single numeric value, or NA_real_ if any non-NA value is <= 0.
Examples
geom_mean(c(1, 2, 3, 4, 5))
#> [1] 2.605171