| coordinates | R Documentation |
Compute coordinates of a composition or a compositional data set with respect to a given log-ratio basis.
The 'basis' argument can be either:
a character string identifying a predefined coordinate system, or
a matrix whose columns define a system of log-contrasts.
The predefined options are:
'"ilr"': isometric log-ratio coordinates,
'"olr"': orthonormal log-ratio coordinates,
'"clr"': centered log-ratio coordinates,
'"alr"': additive log-ratio coordinates,
'"pw"': pairwise log-ratios,
'"pc"': principal component log-ratio coordinates,
'"pb"': principal balance coordinates,
'"cdp"': CoDaPack default balances.
coordinates(X, basis = "ilr")
coord(..., basis = "ilr")
alr_c(X)
clr_c(X)
ilr_c(X)
olr_c(X)
X |
A compositional data set. It can be a numeric matrix, a data frame, or a numeric vector. |
basis |
Basis used to compute the coordinates. Either a character string naming a predefined basis or a matrix with log-ratio basis vectors in columns. |
... |
components of the composition |
Coordinates of 'X' with respect to the given 'basis'. The returned object has the same general type as the input when possible.
ilr_basis, alr_basis, clr_basis,
sbp_basis, composition
coordinates(1:5)
B <- ilr_basis(5)
coordinates(1:5, B)
X <- rbind(1:5, 2:6)
coordinates(X, "clr")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.