[R] Vector Manipulation
Jan_Svatos@eurotel.cz
Jan_Svatos at eurotel.cz
Tue Jul 23 11:37:20 CEST 2002
Hi,
Look at
?findInterval
this looks it best/exactly suits your needs.
-------------------------------------------------
designed for _monospaced_ font
-------------------------------------------------
/- Jan Svatos, PhD Sokolovska 855/225 -/
/- Data Analyst Prague 9 -/
/- Eurotel Praha 190 00 -/
/- jan_svatos at eurotel.cz Czechia -/
-------------------------------------------------
- - - Original message: - - -
From: owner-r-help at stat.math.ethz.ch
Send: 22.7.2002 6:37:15
To: r-help at stat.math.ethz.ch
Subject: [R] Vector Manipulation
Greetings,
I wonder if someone could point me towards a more elegent solution than
what I"ve kluged together. I have a vector "samp1" of 296 integers.
They are sorted in ascending order and the numbers range from 177 to
228,953. I'd like to specify N non-overlapping intervals covering the
range from 0 to 229,354 and then for each range, count the number of
integers from samp1 that fall into that range. What I'll end up with is
an N element vector with each element representing the number of
integers from samp1 found in the Nth range.
Can someone point me to a function / procedure that allows me to specify
the non-overalpping intervals? and also one that I can use to do the
counting?
Best,
Bill Vedder
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._._
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list