R/geoMean.R

Defines functions geoMean

Documented in geoMean

geoMean = function(y)
{
  y = y[!is.na(y) & y > 0]
  if (length(y) == 0) return(NA)
  ly = log(y)
  return(exp(mean(ly, na.rm=T)))
}

Try the sasLM package in your browser

Any scripts or data that you put into this service are public.

sasLM documentation built on Nov. 10, 2022, 5:07 p.m.