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. Some color scale depend on packages "colorRamps", or "gplots".

Usage

1
2
3
4
5
6
7
8
9
wcolorize(
  vector = c(1, 1, 1:6),
  RColorBrewerSet = FALSE,
  ReturnCategoriesToo = FALSE,
  show = FALSE,
  randomize = FALSE,
  set = c(FALSE, "rich", "heat.colors", "terrain.colors", "topo.colors", "matlab",
    "rainbow")[1]
)

Arguments

vector

A vector with categories, can be numbers or strings

RColorBrewerSet

Use one of the RColorBrewer color sets? Provide that name

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 "rich" for gplots::rich.colors, or "matlab" for colorRamps::matlab.like.

Examples

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

vertesy/MarkdownReportsDev documentation built on Nov. 15, 2021, 9:59 a.m.