This is sometimes useful when plotting a factor

fct_rev(f)

Arguments

f

A factor

Examples

f <- factor(c("a", "b", "c")) fct_rev(f)
#> [1] a b c #> Levels: c b a