Learn R Programming

forcats (version 0.0.0.9000)

fct_rev: Reverse the levels of a factor

Description

This is sometimes useful when plotting a factor

Usage

fct_rev(f)

Arguments

f
A factor

Examples

Run this code
f <- factor(c("a", "b", "c"))
fct_rev(f)

Run the code above in your browser using DataLab