color_set_palette: Generate a color vector

View source: R/helper_color.R

color_set_paletteR Documentation

Generate a color vector

Description

Create a list of colors for a data vector by a list major colors.

Usage

color_set_palette(
  vect = c(),
  vectn = c(),
  cols = c("blue", "cyan", "darkorange"),
  black = "",
  gray9 = ""
)

Arguments

vect

A vector for groups.

vectn

An integer vector with length 0 or with the same length of vect for order of elements in vect. default=c()

cols

One of

  • A color names vector

  • An RGB triplet vector

  • A HEX vector

black

A level in vect that should be assigned to black color. default=""

gray9

A level in vect that should be assigned to gray9 color. default=""

Value

a named vector

Examples

color_set_palette( c('apple', 'orange', 'lime', 'apple'), c(2,1,3,2), 'red', 'blue')


mtb documentation built on Oct. 21, 2022, 1:05 a.m.