Skip to contents

Usage

factor_formatter(x)

Arguments

x

A factor or character vector

Value

A formattable formatter function that applies colored backgrounds based on unique factor levels.

Examples

fmt <- factor_formatter(c("low", "medium", "high"))
class(fmt)
#> [1] "formatter" "function"