Skip to content
Prev 169942 / 398506 Next

arithmetic comparison over corresponding values from two vectors

sapply(trgroup, function(x) which(x>=starts & x <=ends))

works for your example data, but there's probably a better way

HTH

KJ

"T Joshi" <tejalonline at gmail.com> wrote in message 
news:11417a880902100902w53664a3dq11aee64a963d8383 at mail.gmail.com...