ternary_transformation | R Documentation |
Functions to transform data from the ternary to cartesian spaces and vice-versa.
tlr2xy(data, coord, ..., inverse = FALSE, scale = TRUE, drop = FALSE)
xy2tlr(data, coord, ..., inverse = FALSE, scale = TRUE)
data |
|
coord |
Coordinate system object, inheriting the |
... |
not used |
inverse |
logical if we are doing a forward (FALSE) or reverse (TRUE) transformation |
scale |
logical as to whether the transformed coordinates are scaled (or reverse scaled in the case of inverse transformation) according to the training routine defined in the coordinate system. |
drop |
drop all non columns which are not involved in the transformation |
tlr2xy
transforms from the ternary to cartesian spaces, an inverse transformation
transforms between cartesian to ternary spaces
xy2tlr
transforms from the cartesian to ternary spaces, an inverse transformation
transforms between ternary to cartesian spaces, it is the reciprocal to tlr2xy
, therefore
an inverse transformation in xy2tlr
function is the same as the forward
transformation in tlr2xy
Nicholas Hamilton
data(Feldspar)
dfm = plyr::rename(Feldspar,c("Ab"="x","An"="y","Or"="z"))
crd = coord_tern()
fwd = tlr2xy(dfm,crd)
rev = tlr2xy(fwd,crd,inverse = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.