After using user_na_to_tagged_na(), I get the warning:
Warning message:
In remove_user_na.haven_labelled_spss(x, user_na_to_tagged_na = TRUE) :
360 different user-defined missing values found in 'x'.
A maximum of 26 could be tagged.
Looking through the code, it seems that remove_user_na.haven_labelled_spss() checks the length of the vector containing missing values using val_to_tag <- x[is.na(x) & !is.na(unclass(x))] %>% unclass() rather than the length of the vector of the unique values (in the example -1 and -99 appear 360 times in the vector test)?
When using
user_na_to_tagged_na()
and specifying two missing values as so:After using
user_na_to_tagged_na()
, I get the warning:Looking through the code, it seems that
remove_user_na.haven_labelled_spss()
checks the length of the vector containing missing values usingval_to_tag <- x[is.na(x) & !is.na(unclass(x))] %>% unclass()
rather than the length of the vector of the unique values (in the example -1 and -99 appear 360 times in the vectortest
)?