zap_label: Zap label

Description Usage Arguments See Also Examples

View source: R/zap_label.R

Description

Removes label, leaving unlabelled vectors as is. Use this if you want to simply drop all label attributes from a data frame.

Usage

1

Arguments

x

A vector or data frame

See Also

Other zappers: zap_empty, zap_formats, zap_labels, zap_widths

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
x1 <- labelled(1:5, c(good = 1, bad = 5))
x1
zap_label(x1)

x2 <- labelled_spss(c(1:4, 9), c(good = 1, bad = 5), na_values = 9)
x2
zap_label(x2)

# zap_label also works with data frames
df <- tibble::data_frame(x1, x2)
df
zap_label(df)

tidyverse/haven documentation built on Nov. 27, 2018, 9:28 p.m.