fct_inorder {forcats}R Documentation

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

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

[Package forcats version 0.1.1 Index]