R/colmap.R

Defines functions colmap

#' @importFrom grDevices heat.colors
colmap <- function(x, cmap=heat.colors) {
  xvals <- unique(x)
  cols <- cmap(length(xvals))
  return(cols[unclass(as.factor(x))])
}
brandmaier/semtree documentation built on April 18, 2024, 3:24 a.m.