-
Notifications
You must be signed in to change notification settings - Fork 115
Closed
Labels
featurea feature request or enhancementa feature request or enhancement
Description
Currently zap_labels()
converts user missing values in labelled_spss objects to NA
.
This should be controllable by the user. I think adding a user_na
option like read_sav()
is the best approach, where FALSE
(default) converts to NA
and TRUE
keeps them as valid values.
library(haven)
x <- labelled_spss(1:3, na_values = 1)
# Current behaviour
zap_labels(x)
#> [1] NA 2 3
# Desired behaviour
zap_labels(x, user_na = TRUE)
#> [1] 1 2 3
Created on 2021-09-15 by the reprex package (v2.0.1)
Metadata
Metadata
Assignees
Labels
featurea feature request or enhancementa feature request or enhancement