Consider:
a <- c("a", "b", "c")
b <- c("a", "e", "f")
c <- c("a", "h", "i")
> a %in% b %in% c
[1] FALSE FALSE FALSE
I would have expected this to evaluate to TRUE FALSE FALSE
, since the first element in each vector is "a". Why is this not the case?