forcats (version 0.4.0)

fct_rev: 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

Run this code
# NOT RUN {
f <- factor(c("a", "b", "c"))
fct_rev(f)
# }

Run the code above in your browser using DataCamp Workspace