https://github.com/cran/robCompositions
Raw File
Tip revision: 809548cfabc86e3512f0fc30dd6c03621ade3d54 authored by Matthias Templ on 08 April 2018, 16:28:01 UTC
version 2.0.7
Tip revision: 809548c
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