wcolorize: wcolorize

Description Usage Arguments Examples

Description

Generate color palettes. Input: a vector with categories, can be numbers or strings. Handles repeating values. Output: color vector of equal length as input. Optionally it can ouput a list where an extra element lists the categories (simply using unique would remove the names). See example.

Usage

1
2
3
wcolorize(vector = c(1, 1, 1:6), RColorBrewerSet = F,
  ReturnCategoriesToo = F, show = F, randomize = F, set = c(F, "rich",
  "heat.colors", "terrain.colors", "topo.colors", "rainbow")[1])

Arguments

vector

A vector with categories, can be numbers or strings

ReturnCategoriesToo

Return unique Categories. See example.

show

Show generated color palette

randomize

Randomize colors

set

Color palette for base ("heat.colors", "terrain.colors", "topo.colors", "rainbow"), or gplots::rich.colors.

UseRColorBrewer

Use RColorBrewer's brewer.pal palettes. Either FALSE or one of the legit RColorBrewer palettes, e.g.: "Set1". See its help. ("Accent", "Dark2", "Paired", "Pastel1", "Pastel2", "Set1", "Set2", "Set3", "Blues", "BuGn", "BuPu", "GnBu", "Greens", "Greys", "Oranges", "OrRd", "PuBu", "PuBuGn", "PuRd", "Purples", "RdPu", "Reds", "YlGn", "YlGnBu", "YlOrBr", "YlOrRd", "BrBG", "PiYG", "PRGn", "PuOr", "RdBu", "RdGy", "RdYlBu", "RdYlGn", "Spectral")

Examples

1
wcolorize (vector=c(1,1,1:6), ReturnCategoriesToo=T, show=T)

vertesy/MarkdownReports.v2.9.5 documentation built on May 22, 2019, 4 p.m.