powered by
Return hex color code for a given discrete categorical variable.
col_of(class, pallet_name = "Dark2")
The discrete categorical variable to return the color of.
The name of the RColorBrewer pallet to get the colors from. Defaults to "Dark2".
RColorBrewer
Vector of character hex color code of the passed categorical variable.
# NOT RUN { col_of(tourr::flea$species) # }
Run the code above in your browser using DataLab