Conveniently maps data values to icons for use in magicIcons(), analogous
to leaflet::colorFactor(), leaflet::colorBin() and
leaflet::colorQuantile(). Icons are, by their nature, discrete, so there is
no analogue to leaflet::colorNumeric(). For leaflet::colorBin() and
leaflet::colorQuantile(), it would make sense to pick "ordered" icons such
as the "hourglass" or "temperature" icon families in Font Awesome.
Arguments
- icons
The icons that values will be mapped to. Note that the
library(e.g.,"fontawesome") is defined inmagicIcons().- domain
The possible values that can be mapped. For
iconFactor()this should be categorical data. ForiconBin()andiconQuantile()- na.icon
The icon to return for missing or out-of-scope values.
- bins, right
Passed to
cut().- n
Number of equal-size quantiles desired. For more precise control, use the
probsargument instead.- probs
A more precise alternative to
probs. Passed directly toquantile().
