Skip to contents

unlab returns variable x without variable labels and value labels

Usage

unlab(x)

Arguments

x

Variable(s). Vector/data.frame/list.

Value

unlab returns original variable x without variable label, value labels.

References

This is a modified version from `expss` package.

See also

Examples

raw_var <- rep(1:2, 5)
var_with_lab <- raw_var
var_lab(var_with_lab) <- "Income"
val_lab(var_with_lab) <- c("Low" = 1, "High" = 2)
identical(raw_var, unlab(var_with_lab)) # should be TRUE
#> [1] TRUE