[R] Setting breaks to data more appropriately

LCOG1 jroll at lcog.org
Mon Mar 22 18:49:56 CET 2010


Basic question.  For the below data, i would like to but each of the values
in a bin that represents their value.  So the below would hopefully put .1
in the 0-.1 bin, .2 in the .11-.2 bin and so forth.  The outlying values
would then be put into and outer category representing everything >1.  Im
using the breaks to inform some code for making a clorepleth map that
represents probabilities, which in some cases IS greater than 1 and i need
to identify those better.  As my code stands now, my real data is put put
into this form when brks is called:

        0%        10%        20%        30%        40%        50%        60% 
0.00000000 0.05054675 0.07787235 0.11235238 0.14424786 0.18089360 0.21475990 
       70%        80%        90%       100% 
0.26309899 0.30807771 0.39478573 0.67573483.

But what i want is for the values to be placed in bins corresponding to
their value(0-.1, .11-.2, .21-.3 etc)  

Pct.SFD<-c(.1,.2,.3,.4,.5,.6,.7,.8,.9,1,2,3)
brks <- quantile(Pct.SFD, seq(0,1,1/10))

I think this is clear.  Thanks
-- 
View this message in context: http://n4.nabble.com/Setting-breaks-to-data-more-appropriately-tp1678019p1678019.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list