assignColorsToGroups.Rd
Given a group membership vector, each group receives a unique color such that the resulting color vector is as long as the group membership vector.
assignColorsToGroups( groups, refName = "ref", myColors = NULL, returnMap = FALSE, hiddenSamples = c() )
groups | a vector of group memberships |
---|---|
refName | the name of the reference group; receives gray as a color |
myColors | an optional map of predefined colors for groups |
returnMap | whether to return the color map together with the colors |
hiddenSamples | optional vector of indices of samples to be hidden; these are assigned an invisible color |
a vector of colors; if returnMap is true, a vector of colors and the color map