I tried to use the 'or' operator in R. However, it does not behave as expected.
(4|6)==1
#TRUE
#expected: FALSE
(4|6)==6
#FALSE
#expected: TRUE
6 %in% c(4,6)
#TRUE
The latter works as expected.
I will use the list version, but why does the or operator behave like it behaves? If i ask whether a number is 4 or 6, I expect that 4 or 6 give me TRUE. However, only 1 is TRUE.