remove_levels: Remove specified levels from a factor

Description Usage Arguments Value

Description

Like droplevels, but only deletes specified levels. If values are set to these levels, they are converted to NA.

Usage

1
remove_levels(x, levels_to_remove)

Arguments

x

Factor variable

levels_to_remove

Character vector of levels to remove.

Value

A factor with the specified levels removed.


kylebittinger/kylemisc documentation built on Dec. 11, 2020, 10:41 a.m.