util_rev_fac | R Documentation |
Reverses the order of the levels of a factor.
util_rev_fac(f)
f |
A factor |
Replacement for forcats::fct_rev(), in order to reduce the number of dependencies to datscience package
Factor f with reversed order of the levels
Björn Büdenbender
## Not run: if (interactive()) { f <- factor(letters[c(1:5)]) (reversed_factor <- util_rev_fac(f)) } ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.