CLR | R Documentation |
Calculates Aitchison's centered logratio transformation for a
dataset of class compositional
or a compositional data
matrix.
CLR(x, ...)
## Default S3 method:
CLR(x, inverse = FALSE, ...)
## S3 method for class 'compositional'
CLR(x, ...)
x |
an object of class |
... |
optional arguments |
inverse |
perform the inverse inverse logratio transformation? |
a matrix of CLR coordinates OR an object of class
compositional
(if inverse=TRUE
)
# 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)
biplot(princomp(clrdat))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.