Learn R Programming

forcats (version 0.0.0.9000)

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