fct_rev: Reverse order of factor levels

View source: R/rev.R

fct_revR 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)

forcats documentation built on Feb. 16, 2023, 8:57 p.m.