https://github.com/cran/robCompositions
Tip revision: 27f32d7077dff1514bdc28b62dad7151d6bc4d65 authored by Matthias Templ on 16 March 2014, 16:25:33 UTC
version 1.8.0
version 1.8.0
Tip revision: 27f32d7
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, ...)
}