Using cut/split seems like gross overkill here.  Among other things,
you don't need to generate labels for all the different ranges.

   which(x<=range)[1]

seems straightforward enough to me, but you could also use the
built-in function findInterval.

              -s

______________________________________________
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.

Reply via email to