color_indexer.Rd
Re-index colors for grouped data, as displayed in plots and other widgets, when groups may be missing.
color_indexer(x, clrby)
x | a data frame. |
---|---|
clrby | column name of the grouping variable to be used for coloring. |
a re-indexed vector of colors from tolpal
.
This is typically used when group levels are in a data set but user selection (mouse brush action) in an interactive plot may not result in a data subset that includes data from all levels of the grouping variable.
# not run