Description Usage Arguments Value References Examples
The distances between ternary coordinate p and a set of ternary coordinates C.
1 | TernaryDistance(p, C)
|
p |
A vector of ternary coordinates p1, p2, p3. |
C |
n by 3 matrix of ternary coordinates p1, p2, p3_i for i=1,...,n. |
A numeric vector of distances between coordinate p and all coordinates in C.
https://en.wikipedia.org/wiki/Barycentric_coordinate_system#Distance_between_points
1 2 3 | p <- c(0.5, 0.2, 0.3)
C <- prop.table(matrix(runif(3*10), ncol = 3), 1)
tricolore:::TernaryDistance(p, C)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.