R/colormap.R

#' @include components.R
NULL

#' @param dashboard A \linkS4class{i2dashboard}.
#' @param map A character vector containing colors and possible the levels they map to (as names).
#' @param name A name for the color mapping.
#'
#' @rdname i2dashboard-content
setMethod("add_colormap", "i2dashboard", function(dashboard, map, name) {
  dashboard@colormaps[[make.names(name)]] <- map
  return(dashboard)
})

Try the i2dash package in your browser

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

i2dash documentation built on Sept. 8, 2023, 6:04 p.m.