View source: R/general.purpuse.utilities.R
char2col | R Documentation |
Sorts t numerically if possible, alphabetically otherwise.
char2col(
t,
bpal = "Set1",
colfun = randomcoloR::distinctColorPalette,
palette = TRUE,
random.seed = 1234
)
t |
input character vector |
bpal |
RColorBrewer pallete to be used if number of colors allows |
colfun |
pallete function to be used in number of colors 10 or more |
palette |
logical, specifies whether pallete (color per unique value in t) or colour along t should be returned |
random.seed |
seed to be set befor color generation (for stochastic colfuns) |
names colour vector
char2col(c('a','a','b'))
char2col(c(1,1,11,2))
char2col(c(T,F))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.