Hello, I'm a new R user.
I have two different dummy tables with the variable name tb1 and tb2. tb1< v1 v2 v3 v4 "chr1" 22 23 3 "chr1" 36 37 1 "chr1" 54 55 0 "chr1" 77 78 1 "chr2" 80 81 4 "chr2" 85 86 0 "chr2" 99 100 1 "chr2" 105 106 0 "chr2" 120 121 1 "chr2" 130 131 1 "chr2" 140 141 0 "chr2" 150 151 5 "chr3" 172 173 0 "chr3" 177 178 1 "chr3" 190 191 6 "chr3" 200 201 8 "chr3" 220 221 0 "chr3" 300 301 9 "chr3" 310 311 10 --------------------------------- tb2< v1 v2 v3 "chr1" 20 40 "chr1" 70 80 "chr2" 90 110 "chr2" 130 140 "chr3" 190 230 The first column is the common field of the both tables. In the first table column v3 is always v2+1 while in the second table v2 and v3 hold the range. I want to know which rows of tb1 intercept with the range between v2 and v3 of tb3. I tried but I failed to solve the problem. Could anyone help me please? Thanks in advance. Mauluda [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.