50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

forcats (version 0.1.0)

fct_unique: Unique values of a factor

Description

Unique values of a factor

Usage

fct_unique(f)

Arguments

f
A factor

Examples

Run this code
f <- factor(letters[rpois(100, 10)])

unique(f)     # in order of appearance
fct_unique(f) # in order of levels

Run the code above in your browser using DataLab