colorize_levels {lgr} | R Documentation |
Colorize Levels
Description
Colorize Levels
Usage
colorize_levels(
x,
colors = getOption("lgr.colors", NULL),
transform = identity
)
Arguments
x |
|
colors |
A |
transform |
a |
Value
a character
vector wit color ANSI codes
See Also
Other formatting utils:
label_levels()
Examples
cat(colorize_levels(c(100, 200)))
cat(colorize_levels(c("trace", "warn ", "DEBUG")))
cat(colorize_levels(c("trace", "warn ", "DEBUG"), transform = function(x) strtrim(x, 1) ))
[Package lgr version 0.4.4 Index]