https://github.com/cran/robCompositions
Tip revision: f01abd0472ad5b8c0738280481e4a1b4d39e8832 authored by Matthias Templ on 11 January 2017, 23:50:05 UTC
version 2.0.3
version 2.0.3
Tip revision: f01abd0
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, ...)
}