R: assign colours to classes from classInterval object
findColours
R Documentation
assign colours to classes from classInterval object
Description
This helper function is a wrapper for findCols to extract classes from a "classInterval" object and assign colours from a palette created by colorRampPalette from the two or more colours given in the pal argument. It also returns two attributes for use in constructing a legend.
a character vector of at least two colour names; colorRampPalette is used internally to create the required number of colours
under
character string value for "under" in legend if cutlabels=FALSE
over
character string value for "over" in legend if cutlabels=FALSE
between
character string value for "between" in legend if cutlabels=FALSE
digits
minimal number of significant digits in legend
cutlabels
use cut-style labels in legend
Value
a character vector of colours with attributes: "table", a named frequency table; "palette", a character vector of colours corresponding to the specified breaks.