colorize: Create vector of color from vector

Description Usage Arguments Examples

View source: R/helpers.R

Description

Create vector of color from vector

Usage

1
colorize(x, colors = c("#440154", "#21908C", "#FDE725"))

Arguments

x

A numeric, character or factor object.

colors

A character string of colors (ordered) to colorize x

Examples

1
2
3
colorize(runif(10))

colorize(LETTERS[rbinom(20, 5, 0.5)], c("#FF0000", "#00FFFF"))

highcharter documentation built on Jan. 3, 2022, 5:08 p.m.