A lens into the levels of an object. Usually this is factor levels. Lens equivalent of levels and levels<-.

levels_l

Format

An object of class lens of length 2.

Examples

x <- factor(c("a", "b")) view(x, levels_l)
#> [1] "a" "b"
set(x, levels_l, c("A", "B"))
#> [1] A B #> Levels: A B