R/gm_backup.R

gm_backup <- 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])))
}
matthias-da/robCompositions documentation built on Jan. 15, 2024, 11:24 p.m.