[R] Finding regions of overlap

Liaw, Andy andy_liaw at merck.com
Fri Aug 12 15:30:50 CEST 2005


Am I missing something?  It seems quite easy to me:

Suppose the intervals are (l1, u1), (l2, u2), ..., (ln, un).  The
intersection, if non-empty, would be (max(l1, ..., ln), min(u1, ..., un)),
and the union (min(l1, ..., ln), max(u1, ..., un)).

Andy

> From: Sean Davis
> 
> I have a number of regions consisting of (start,end) pairs.  
> I would like to
> find regions of overlap among various sets of these regions.  In other
> words, I would like to find unions/intersections of arbitrary sets of
> regions.  Does this smell of anything anyone has already done?
> 
> Thanks,
> Sean
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> 
> 
>




More information about the R-help mailing list