Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

drop_unused_value_labels

Drop unused value labels


Description

Drop value labels associated to a value not present in the data.

Usage

drop_unused_value_labels(x)

Arguments

x

A vector or a data frame.

Examples

x <- labelled(c(1, 2, 2, 1), c(yes = 1, no = 2, maybe = 3))
x
drop_unused_value_labels(x)

labelled

Manipulating Labelled Data

v2.8.0
GPL-3
Authors
Joseph Larmarange [aut, cre] (<https://orcid.org/0000-0001-7097-700X>), Daniel Ludecke [ctb], Hadley Wickham [ctb], Michal Bojanowski [ctb], François Briatte [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.