R/cgraph.R

cgraph <- function(x, y = NULL, ...){
	if(!is.null(y)) mat <- cbind(x, y) else mat <- x
	dd <- dim(mat)[1]
	if(dd < 2) return()
	if(is.null(dd)) return()
	ddComb <- combn(1:dd, 2)
	segments(mat[ddComb[1,], 1], mat[ddComb[1,], 2], mat[ddComb[2,], 1], mat[ddComb[2,], 2], ...)
}

Try the spider package in your browser

Any scripts or data that you put into this service are public.

spider documentation built on May 2, 2019, 5:16 p.m.