Last chance! 50% off unlimited learning
Sale ends in
labelled
variable.
get_na_flags(x)
labelled
).get_na
.
get_na
to get value codes of labelled missing values;
get_values
to get values associated with labels;
see set_na
to replace specific values with NA
and to_na
to convert missing value codes into NA
.
# create labelled integer, with missing flag
x <- labelled(c(1, 2, 1, 3, 4, 1),
c(Male = 1, Female = 2, Refused = 3, "N/A" = 4),
c(FALSE, FALSE, TRUE, TRUE))
get_na_flags(x)
Run the code above in your browser using DataLab