Skip to content
Prev 332935 / 398503 Next

union of list objects if objects intersect

Your specification is a unclear (to me anyway): What do you want to
return if the intersection is empty? What if intersect(ja[[i]],
ja[[i+1]]) is empty for all i? What if  length(intersect( ja[[i]],
ja[[i+1]] )) ==0 but intersect(ja[[i]],ja[[i+2]]) is nonempty?  Your
example isn't -- you did not specify what the return should be on your
list.

Note also that your example test  is wrong: the length of the
intersection must =0 not the intersection.

-- Bert
On Sat, Nov 9, 2013 at 12:45 PM, Hermann Norpois <hnorpois at gmail.com> wrote: