The hist() function of R generates a histogram. Is there any way to find the count of each bin of the histogram?
The hist() function returns an object of class "histogram". It contains the component "counts". You can use it to see the count for each bin.
Here is an example:
> x=rnorm(50)> h = hist(x, breaks = 5)> h$counts 7 18 15 9 1