auto_set_colorcode returns a dataframe with group names and color codes.

auto_set_colorcode(groups, palette = "Set1")

Arguments

groups

A vector giving the names of groups. Duplicate group names will be disregarded.

palette

A string giving the name of palette provided in RColorBrewer.

Value

A dataframe that contains color codes for samples from different groups. The first column consists of names of the groups and the second column contains the coresponding color codes.

Examples

auto_set_colorcode(c('a','b','c'))