unlab: Drop variable label and value labels

View source: R/labels.R

unlabR Documentation

Drop variable label and value labels

Description

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

drop_lab unval

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


shug0131/cctu documentation built on Feb. 15, 2025, 3:27 p.m.