R/geometric.mean.R

"geometric.mean" <- 
function(x,na.rm=TRUE){ if (is.null(nrow(x))) {exp(mean(log(x),na.rm=na.rm)) } else {
exp(apply(log(x),2,mean,na.rm=na.rm))} }

Try the psych package in your browser

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

psych documentation built on Sept. 26, 2023, 1:06 a.m.