e_color_range: Color range

Description Usage Arguments Examples

View source: R/helpers.R

Description

Build manual color range

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
e_color_range(
  data,
  input,
  output,
  colors = c("#bf444c", "#d88273", "#f6efa6"),
  ...
)

e_color_range_(
  data,
  input,
  output,
  colors = c("#bf444c", "#d88273", "#f6efa6"),
  ...
)

Arguments

data

Data.frame in which to find column names.

input, output

Input and output columns.

colors

Colors to pass to colorRampPalette.

...

Any other argument to pass to colorRampPalette.

Examples

1
2
3
df <- data.frame(val = 1:10)

e_color_range(df, val, colors)

Example output

sh: 1: cannot create /dev/null: Permission denied
sh: 1: cannot create /dev/null: Permission denied
   val  colors
1    1 #BF444C
2    2 #C55354
3    3 #CB615D
4    4 #D06E66
5    5 #D57B6F
6    6 #DC8E79
7    7 #E4A784
8    8 #EBBF8F
9    9 #F1D79A
10  10 #F6EFA6

echarts4r documentation built on March 7, 2021, 5:06 p.m.