I have some data that I've built histograms out of in R. Now I want to play around with the data, but first I want to summarise it in the same way the histogram does. That is, I want to take my data vector, and count how many points fall in each bin interval in the same way that R's hist function does.
I was about to do this from scratch, but then I thought: R already knows how to do this, I just need to find out how to take the first half of the hist function and just run that. So how do I do this?