[R] Histogram Bin

Research risk2009 at ath.forthnet.gr
Fri May 14 15:55:35 CEST 2010


Hello,

Is there a function that returns the number of the "bin" (or quantile, 
or percentile etc. etc.) that a value of a variable may belong to?

Tor example:

breaks<-hist(variable, 18, plot=FALSE)

If the following breaks are

  5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85

the boundaries of successive bins of a histogram, then value "6" belongs 
to the 2nd bin.

Best regards,
Costas



More information about the R-help mailing list