https://github.com/cran/robCompositions
Raw File
Tip revision: 744e252d9a1ee4b0d8263a5a0da37e1f5255129c authored by Matthias Templ on 08 November 2018, 13:00:03 UTC
version 2.0.9
Tip revision: 744e252
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, ...)
}
back to top