Skip to content

arithmetic comparison over corresponding values from two vectors

4 messages · T Joshi, Marc Schwartz, Keith Jewell +1 more

#
on 02/10/2009 11:02 AM T Joshi wrote:
Try this:
[1] 1 3

HTH,

Marc Schwartz
#
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...
#
On Tue, 10 Feb 2009, Keith Jewell wrote:

            
For large scale problems this works well:

 	 http://finzi.psych.upenn.edu/R/Rhelp02a/archive/60815.html


HTH,

Chuck
Charles C. Berry                            (858) 534-2098
                                             Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu	            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901