Learn R Programming

papaja (version 0.1.0.9655)

droplevels,annotated_factor-method: Drop Unused Levels from Factors

Description

The function droplevels is used to drop unused levels from a factor or, more commonly, from factors in a data.frame. This method preserves meta-data (e.g., label and unit of measurement).

Usage

# S4 method for annotated_factor
droplevels(x, ...)

# S4 method for annotated_named_factor droplevels(x, ...)

Arguments

x

An annotated factor from which to drop unused levels.

...

Further arguments that can be passed, see droplevels for further options.

See Also

droplevels