Learn R Programming

provenance (version 1.4)

CLR: Centred logratio transformation

Description

Calculates Aitchison's centered logratio transformation for a dataset of class compositional

Usage

CLR(x)

Arguments

x
an object of class compositional

Value

  • a matrix of CLR coordinates

Examples

Run this code
# The following code shows that applying provenance's PCA function
# to compositional data is equivalent to applying R's built-in
# princomp function to the CLR transformed data.
data(Namib)
plot(PCA(Namib$Major))
dev.new()
clrdat <- CLR(Namib$Major)$x
biplot(princomp(clrdat))

Run the code above in your browser using DataLab