This function always returns the value TRUE
.
Examples
# `true()` is useful for supplying a default formatter
# to `highlight_case()`.
levels <- highlight_case(
1:5,
1 ~ label("Low"),
2 ~ label("Mid"),
3 ~ label("High"),
true ~ label("?") # Label any value not in 1, 2, 3
)
print(levels)
#> <highlight_case<integer>[5]>
#> [1] 1 [Low] 2 [Mid] 3 [High] 4 [?] 5 [?]