clr_basis | R Documentation |
Compute the transformation matrix to express a composition using the linearly dependant centered log-ratio coordinates.
clr_basis(dim)
dim |
An integer indicating the number of components. If a dataframe or matrix is provided, the number of components is inferred from the number of columns. If a character vector specifying the names of the parts is provided the number of component is its length. |
matrix
Aitchison, J. (1986) The Statistical Analysis of Compositional Data. Monographs on Statistics and Applied Probability. Chapman & Hall Ltd., London (UK). 416p.
(B <- clr_basis(5))
# CLR coordinates are linearly dependant coordinates.
(clr_coordinates <- coordinates(c(1,2,3,4,5), B))
# The sum of all coordinates equal to zero
sum(clr_coordinates) < 1e-15
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.