Learn R Programming

forcats (version 0.0.0.9000)

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 DataLab