fct_rev {forcats} | R Documentation |
Reverse order of factor levels
Description
This is sometimes useful when plotting a factor.
Usage
fct_rev(f)
Arguments
f |
A factor (or character vector). |
Examples
f <- factor(c("a", "b", "c"))
fct_rev(f)
[Package forcats version 1.0.0 Index]