clr: centred logratio transformation

View source: R/transformations.R

clrR Documentation

centred logratio transformation

Description

Maps compositional data from an n-dimensional simplex to an n-dimensional Euclidean space with Aitchison's centred logratio transformation.

Usage

clr(dat, inverse = FALSE)

Arguments

dat

an n x m matrix

inverse

logical. If TRUE, applies the inverse clr tranformation

Value

an n x m matrix

Examples

xyz <- rbind(c(0.03,99.88,0.09),
             c(70.54,25.95,3.51),
             c(72.14,26.54,1.32))
colnames(xyz) <- c('a','b','c')
rownames(xyz) <- 1:3
pc <- prcomp(clr(xyz))
biplot(pc)

geostats documentation built on Jan. 7, 2023, 5:32 p.m.

Related to clr in geostats...