Extension of levels() function. If levels(x) is not NULL, it is
returned. Otherwise, character representation of unique sorted values is
returned (with NA treated based on na.last as in sort()).
levels2(x, na.last = TRUE)
| x | An object of interest. |
|---|---|
| na.last | Argument for controlling the treatment of |
#> [1] "a" "b" "c"#> [1] "1" "2" "10" "11" NA