zap_ipums_attributes: Remove label attributes from a data frame or labelled vector

View source: R/lbl_helpers.R

zap_ipums_attributesR Documentation

Remove label attributes from a data frame or labelled vector

Description

Remove all label attributes (value labels, variable labels, and variable descriptions) from a data frame or vector.

Usage

zap_ipums_attributes(x)

Arguments

x

A data frame or labelled vector (for instance, from a data frame column)

Value

An object of the same type as x without "val_labels", ⁠"var_label⁠", and "var_desc" attributes.

See Also

Other lbl_helpers: lbl(), lbl_add(), lbl_clean(), lbl_define(), lbl_na_if(), lbl_relabel()

Examples

cps <- read_ipums_micro(ipums_example("cps_00157.xml"))

attributes(cps$YEAR)
attributes(zap_ipums_attributes(cps$YEAR))

cps <- zap_ipums_attributes(cps)
attributes(cps$YEAR)
attributes(cps$INCTOT)

ipumsr documentation built on Sept. 12, 2024, 7:38 a.m.