Negation of %in% in R [duplicate]
问题 This question already has answers here : Opposite of %in% (8 answers) Closed last year . Is there a short negation of %in% in R like !%in% or %!in% ? Of course I can negate c("A", "B") %in% c("B", "C") by !(c("A", "B") %in% c("B", "C")) (cf. this question) but I would prefere a more straight forward approach and save a pair of brackets (alike presumably most people would prefer c("A", "B") != c("B", "C") over !(c("A", "B") == c("B", "C")) ). 回答1: No, there isn't a built in function to do that