Learn R Programming

provenance (version 0.5)

clr: Centred logratio transformation

Description

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

Usage

clr(x, ...)

## S3 method for class 'compositional': clr(x, ...)

Arguments

x
an object of class compositional
...
optional arguments of the generic function

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