R/clr.R

"clr" <-
function(X){
# centered logratio transformation
Xgeom <- exp(1)^apply(log(X),1,mean)
X.clr <- log(X/Xgeom)
return(X.clr)
}

Try the chemometrics package in your browser

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

chemometrics documentation built on Aug. 25, 2023, 5:18 p.m.