Learn R Programming

spinifex (version 0.2.5)

col_of: Return hex color code for a given discrete categorical variable.

Description

Return hex color code for a given discrete categorical variable.

Usage

col_of(class, pallet_name = "Dark2")

Arguments

class

The discrete categorical variable to return the color of.

pallet_name

The name of the RColorBrewer pallet to get the colors from. Defaults to "Dark2".

Value

Vector of character hex color code of the passed categorical variable.

Examples

Run this code
# NOT RUN {
col_of(tourr::flea$species)
# }

Run the code above in your browser using DataLab