Simplex-Transformations {DirichletReg} | R Documentation |
These functions transform a matrix with three or four components to fit into a two- or three-dimensional simplex (triangle or tetrahedron).
toSimplex(x)
toTernary(abc)
toTernaryVectors(c1, c2, c3)
toQuaternary(abcd)
toQuaternaryVectors(c1, c2, c3, c4)
x |
a matrix-like object with 3 or 4 columns. |
abc |
a matrix-like object with 3 columns. |
abcd |
a matrix-like object with 4 columns. |
c1 |
a numeric vector with values of the first component. |
c2 |
a numeric vector with values of the second component. |
c3 |
a numeric vector with values of the third component. |
c4 |
a numeric vector with values of the fourth component. |
Most of these functions are only used internally, but sometimes it might be useful to plot “custom” ternary or quaternary graphics.
Note that, apart from toSimplex()
, functions do not have any checks, so it is advisable to use this function if elements are added to plots or own graphics are created.
The function returns a matrix
object with coordinates in two or three dimensions
In prior versions (up to 0.5-0), an unexported function coord.trafo()
was used internally and could also be accessed via DirichletReg:::coord.trafo()
.
If you have used this in your code, you will get a message that the function is now deprecated and will become defunct in the future.
Use toSimplex()
instead.
Marco J. Maier
# create a DirichletRegData object from the Arctic Lake data
"to be added"