x <- declared(
c(1:2, -91),
labels = c(Good = 1, Bad = 2, Missing = -91),
na_values = -91
)
x
is.empty(x) # FALSE FALSE FALSE
anyNAempty(x) # FALSE
x <- c(x, NA)
is.empty(x) # FALSE FALSE FALSE TRUE
anyNAempty(x) # TRUE
Run the code above in your browser using DataLab