Change factor levels

change_fac_lev(x, levels = NULL, last = FALSE)

Arguments

x

vector

levels

custom levels

last

put the custom levels to the last

Value

factor

Examples

change_fac_lev(letters[1:5], levels = c("c", "a"))
#> [1] a b c d e
#> Levels: c a b d e