Learn R Programming

labelled (version 2.12.0)

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

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

Run the code above in your browser using DataLab