color_bar: Create a color-bar formatter

View source: R/formatter.R

color_barR Documentation

Create a color-bar formatter

Description

Create a color-bar formatter

Usage

color_bar(color = "lightgray", fun = proportion, ...)

Arguments

color

the background color of the bars

fun

the transform function that maps the input vector to values from 0 to 1. Uses proportion() by default.

...

additional parameters passed to fun

See Also

normalize_bar(), proportion_bar()

Examples


formattable(mtcars, list(mpg = color_bar("lightgray", proportion)))


renkun-ken/formattable documentation built on Dec. 7, 2024, 10:19 p.m.