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

______________________________________________
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