Learn R Programming

forcats (version 0.0.0.9000)

fct_drop: Drop unnused levels

Description

Same as droplevels(), but with consistent name scheme.

Usage

fct_drop(f)

Arguments

f
A factor

Examples

Run this code
f <- factor(c("a", "b"), levels = c("a", "b", "c"))
f
fct_drop(f)

Run the code above in your browser using DataLab