This is a shortcut for creating factors with levels as the order
of appearance of the specified levels.
Arguments
- ...
unique elements or vectors with unique elements
Examples
factor("b","a")
#> [1] <NA>
#> Levels: a
cl("b","a")
#> [1] b a
#> Levels: b a
x <- c("b","a")
factor(x)
#> [1] b a
#> Levels: a b
cl(x)
#> [1] b a
#> Levels: b a