https://github.com/cran/robCompositions
Tip revision: 54cbcf1d6d3ecbca1153e8f00a804e837237f09d authored by Matthias Templ on 07 February 2014, 00:00:00 UTC
version 1.7.0
version 1.7.0
Tip revision: 54cbcf1
ternaryDiagLines.R
ternaryDiagLines <- 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
lines(xp, yp, ...)
}