Reorders levels in order of first appearance or frequency.

Share:

Description

Reorders levels in order of first appearance or frequency.

Usage

1
2
3

Arguments

f

A factor

Examples

1
2
3
4
f <- factor(c("b", "b", "a", "c", "c", "c"))
f
fct_inorder(f)
fct_infreq(f)