[R] Best way to coerce numerical data to a predetermined histogram bin?

2012-12-06 Thread Jonathan Greenberg
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

Re: [R] Best way to coerce numerical data to a predetermined histogram bin?

2012-12-06 Thread Jeff Newmiller
?cut --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#..

Re: [R] Best way to coerce numerical data to a predetermined histogram bin?

2012-12-06 Thread Greg Snow
?findInterval On Thu, Dec 6, 2012 at 3:00 PM, Jonathan Greenberg j...@illinois.eduwrote: 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: