color_vctr: Create a color_vctr

Description Usage Arguments Value Examples

View source: R/color_vctr.R

Description

This is the generic method method dispatches color_vctr generation based on the first argument.

Usage

1
color_vctr(x = double(), text_color = NA, background = NA, style = NA)

Arguments

x

data source determining method dispatch

text_color

A vector of length 1 or same length as vect. Details the color the text should be. Valid values can be found from the 'valid_text_color()' function.NA means no text color.

background

A vector of length 1 or same length as vect. Details the background color of the text. Valid values can be found from the 'valid_background()' function. NA means no background color.

style

A vector of length 1 or same length as vect. Details the style of the text Valid values can be found from the 'valid_style()' function. NA means no styling.

Value

a color_vctr

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
num_vec <-
  color_vctr(1:5,
             text_color = "blue",
             background = "yellow",
             style = "bold")
char_vec <-
  color_vctr(
    LETTERS,
    text_color = color_scale("Blues"),
    background = "darkgrey",
    style = "italic"
  )
if(interactive()){
  num_vec
  char_Vec
}

thebioengineer/colortable documentation built on Sept. 2, 2020, 10:35 a.m.