if (! requireNamespace("dplyr")) {
stop("Please install the 'dplyr' package to run this example")
}
ht <- hux(runif(5), letters[1:5])
map_background_color(ht, by_cases(
. == "a" ~ "red",
. %in% letters ~ "green",
. < 0.5 ~ "pink"
))
Run the code above in your browser using DataLab