This is sometimes useful when plotting a factor.
fct_rev(f)
f
A factor (or character vector).
Run examples
f <- factor(c("a", "b", "c")) fct_rev(f)