[R] Intersecting list vs rows in matrix

GL pflugg at shands.ufl.edu
Tue Aug 10 22:42:20 CEST 2010


Know that if I have List_1 and List_2 that I can check to see if the
intersect via the code below:

List _1: 
a, b, c, d, e, f, g 
List_2: 
z, y, x, w, v, u, b 
length(intersect(List_1, List_2)) > 0
return = true

If instead I wanted to check a dataframe that is a "list of lists," how
would I do that by record without looping?

List _1: 
a, b, c, d, e, f, g 

List_2: 
z, y, x, w, v, u, b 
y, z, w, v, v, u, m
z, y, x, a, b, c
.
.
.

return
true
false
true
,
,
,

-- 
View this message in context: http://r.789695.n4.nabble.com/Intersecting-list-vs-rows-in-matrix-tp2320427p2320427.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list