Description Usage Arguments Format Value See Also Examples
hilighter_colors
- A palette of 10 hilighter colors.
gradient_colors
- A function to create a palette function of interpolated
colors.
view_colors
- Plots vector of colors.
assert_hex
- Convert colors to hexadecimal.
map_colors
- Add colors to a list to make a named list which is a map.
1 2 3 4 5 6 7 8 9 |
x |
A vector of colors (either R |
list |
A list of matches for a map. |
colors |
A vector of colors. |
An object of class character
of length 10.
view_colors
plots the colors as bars
assert_hex
returns a vector of hexadecimal strings
map_colors
returns a names list
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | view_colors(hilighter_colors)
view_colors(c("#FFA500", "#B3B3B3", "#FFFF00", 'red', 'blue', 'black'))
view_colors(gradient_colors(sort(hilighter_colors))(25))
## Not run:
view_colors(gradient_colors(RColorBrewer::brewer.pal(9, 'Set1'))(30))
## End(Not run)
## Not run:
library(tidyverse)
map_hilight <- list(
c('\\bwe(\'[a-z]+)?\\b'),
c('\\bhe(\'[a-z]+)?\\b'),
'you',
'\\bi(?=($|\\s))'
) %>%
map_colors()
set.seed(10)
presidential_debates_2012 %>%
dplyr::filter(person %in% c('ROMNEY', 'OBAMA')) %>%
dplyr::group_by(person) %>%
dplyr::sample_n(15) %$%
hilight_term(dialogue, map_hilight, list(person)) %>%
plot()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.