Removes label, leaving unlabelled vectors as is. Use this if you want to
simply drop all label attributes from a data frame.
This function removes variable labels; use zap_labels() to remove value
labels.
zap_label(x)
| x | A vector or data frame |
|---|
Other zappers:
zap_empty(),
zap_formats(),
zap_labels(),
zap_widths()
#> <labelled<integer>[5]> #> [1] 1 2 3 4 5 #> #> Labels: #> value label #> 1 good #> 5 badzap_label(x1)#> <labelled<integer>[5]> #> [1] 1 2 3 4 5 #> #> Labels: #> value label #> 1 good #> 5 bad#> <labelled_spss<double>[5]> #> [1] 1 2 3 4 9 #> Missing values: 9 #> #> Labels: #> value label #> 1 good #> 5 badzap_label(x2)#> <labelled_spss<double>[5]> #> [1] 1 2 3 4 9 #> Missing values: 9 #> #> Labels: #> value label #> 1 good #> 5 bad#> # A tibble: 5 x 2 #> x1 x2 #> <int+lbl> <dbl+lbl> #> 1 1 [good] 1 [good] #> 2 2 2 #> 3 3 3 #> 4 4 4 #> 5 5 [bad] 9 (NA)zap_label(df)#> # A tibble: 5 x 2 #> x1 x2 #> <int+lbl> <dbl+lbl> #> 1 1 [good] 1 [good] #> 2 2 2 #> 3 3 3 #> 4 4 4 #> 5 5 [bad] 9 (NA)