Learn R Programming

highcharter (version 0.3.0)

colorize_vector: Create vector of color from vector

Description

Using viridis

Usage

colorize_vector(x, option = "D")

Arguments

x
A numeric, character or factor vector.
option
A character string indicating the colormap option to use.

Examples

Run this code
x <- runif(50)
colorize_vector(x)

x <- sample(letters[1:4], size = 20, replace = TRUE)
colorize_vector(x)

Run the code above in your browser using DataLab