geometric_mean(x, na.rm = FALSE)
Function calculating the geometric mean of numeric vectors
geometric_mean(c(1,3, 9)) [1] 3 geometric_mean(c(1,3, NA)) [1] NA geometric_mean(c(1,3, NA), na.rm = TRUE) [1] 1.732051