https://github.com/cran/robCompositions
Tip revision: 27f32d7077dff1514bdc28b62dad7151d6bc4d65 authored by Matthias Templ on 16 March 2014, 16:25:33 UTC
version 1.8.0
version 1.8.0
Tip revision: 27f32d7
gm.R
gm <- function (x) {
if(!is.numeric(x)) stop("x has to be a vector of class numeric")
if (any(na.omit(x == 0)))
0
else exp(mean(log(unclass(x)[is.finite(x) & x > 0])))
}