Skip to content
Prev 316752 / 398506 Next

Compare each element of a list to a vector

Try
  > datalist %in% list(x)
  [1]  TRUE FALSE FALSE FALSE
Both arguments, e1 and e2, of e1 %in% e2 should be of the same type:
e1 %in% e2 is comparing e1[i] and e2[j].

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com