[R] intersect

Sean Anderson sc2ander at xcskier.com
Wed May 12 05:46:37 CEST 2010


<jayuan2008 at yahoo.com> wrote:
> how can I test every element in a vector whether appears in another vector?
> such as
> a<-c("aa", "bb", "ff", "cc")
> b <-c("oo","jj","bb","cc")

a %in% b
[1] FALSE  TRUE FALSE  TRUE



More information about the R-help mailing list