I have two lists that contain S4
objects. Now I want to ask if an element of list_1 contains an element of list_2, like I do in the following example for lists of character vectors.
s<-list(a=LETTERS[1:3],b=LETTERS[4:6])
t<-list(n=LETTERS[1:3],v=LETTERS[1:4])
s %in% t
But does it prove if the objects are identical? If not, how to select the element of list_1 which exists in list_2 without using a loop?