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=TRUE)))
}

Try the sasLM package in your browser

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

sasLM documentation built on March 8, 2026, 5:06 p.m.