I am using %in% to see if the vector contain what I need, like below:
> c(1,2)%in%1:4
[1] TRUE TRUE
> c(1,5)%in%1:4
[1] TRUE FALSE
For the first case, I want the final outcome to be a single TRUE and for the second case, the outcome needs to be a single FALSE (i.e. like a AND truth table).
How can it be done?
Thanks.
Use all():