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. 19, 2023, 5:12 p.m.