forcats (version 0.1.1)

fct_inorder: Reorders levels in order of first appearance or frequency.

Description

Reorders levels in order of first appearance or frequency.

Usage

fct_inorder(f)
fct_infreq(f)

Arguments

f
A factor

Examples

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

Run the code above in your browser using DataCamp Workspace