Skip to content
Prev 58860 / 398502 Next

Logical "and"

You can use setdiff if you only need the unique values of a that are not
in b. If you want all values you can use

a[a%in%setdiff(a,b)]

There are also intersection, union etc...
see
?setdiff
On Thu, 11 Nov 2004, Alexander Sokol wrote: