Learn R Programming

mark (version 0.8.1)

drop_levels: Drop levels

Description

Drop unused levels of a factor

Usage

drop_levels(x, ...)

# S3 method for data.frame drop_levels(x, ...)

# S3 method for fact drop_levels(x, ...)

# S3 method for factor drop_levels(x, ...)

Arguments

x

A factor or data.frame

...

Additional arguments passed to methods (not used)

See Also

base::droplevels

Other factors: as_ordered(), char2fact(), fact(), fact2char(), fact_na()