I have a list of patient IDs, but they go by two different IDs(ID1 and ID2). How do I figure out which patients on the list appeared under both IDs?
ID1 ID2
11 12
13 14
15 16
17 18
19 20
21 22
I have a list
list=c(11,13,14,15,16,18,18,19,20)
I need to see which patients appeared under both IDs, by ID1, such that I would get
>13,15,19
Thank you!