CLR {provenance} | R Documentation |
Centred logratio transformation
Description
Calculates Aitchison's centered logratio transformation for a
dataset of class compositional
or a compositional data
matrix.
Usage
CLR(x, ...)
## Default S3 method:
CLR(x, inverse = FALSE, ...)
## S3 method for class 'compositional'
CLR(x, ...)
Arguments
x |
an object of class |
... |
optional arguments |
inverse |
perform the inverse inverse logratio transformation? |
Value
a matrix of CLR coordinates OR an object of class
compositional
(if inverse=TRUE
)
Examples
# 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))
[Package provenance version 4.3 Index]