R/linked2col.R

Defines functions linked2col

linked2col <-
function(dat, position.legend, palette) {
	
	color <- palette 

	sortID <- sort(as.character(dat$index),decreasing=FALSE,index.return=TRUE)$ix
	sortID2 <- sort(sortID, index.return=TRUE)$ix
	
	colorl <- rep(color, length.out=nrow(dat))
	return (colorl[sortID2])
}

Try the treemap package in your browser

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

treemap documentation built on May 31, 2023, 8:01 p.m.