Displaying 1 result from an estimated 1 matches for "754309".
Did you mean:
750309
2012 Dec 06
2
Best way to coerce numerical data to a predetermined histogram bin?
Folks:
Say I have a set of histogram breaks:
breaks=c(1:10,15)
# With bin ids:
bin_ids=1:(length(breaks)-1)
# and some data (note that some of it falls outside the breaks:
data=runif(min=1,max=20,n=100)
***
What is the MOST EFFICIENT way to "classify" data into the histogram bins
(return the bin_ids) and, say, return NA if the value falls outside of the
bins.
By classify, I mean