<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