let <- ordered(letters[1:5])
NA_at(let, c(1, 3, 5)) # [1] b d
NA_if(let, let <= "b") # [1] c d e
NA_in(let, c("a", "c")) # [1] b d e
NA_out(let, c("a", "c")) # [1] a c
Run the code above in your browser using DataLab