fct_discard: Discard specified levels of a factor

View source: R/utils_factor.R

fct_discardR Documentation

Discard specified levels of a factor

Description

[Stable]

This discards the observations as well as the levels specified from a factor.

Usage

fct_discard(x, discard)

Arguments

x

(factor)
the original factor.

discard

(character)
levels to discard.

Value

A modified factor with observations as well as levels from discard dropped.

Examples

fct_discard(factor(c("a", "b", "c")), "c")


tern documentation built on Sept. 24, 2024, 9:06 a.m.