https://github.com/cran/robCompositions
Tip revision: 2ad963b97009de7f1bf46c5da8604388c2c67d05 authored by Matthias Templ on 27 February 2013, 09:44:32 UTC
version 1.6.3
version 1.6.3
Tip revision: 2ad963b
ternaryDiagPoints.R
ternaryDiagPoints <- function(x, ...){
s <- rowSums(x)
if (any(s <= 0))
stop("rowSums of the input data x must be positive.")
x <- x/s
top <- sqrt(3)/2
xp <- x[, 2] + x[, 3]/2
yp <- x[, 3] * top
points(xp, yp, ...)
}