0

I have a vector of continuous observations like so:

x = c(0,0.001,0.03,0.8,0.005,0.6,0.12,0.3,0.75,0.9,0.043,0.81,0.5,0.21,0.27,0.17,1,0.9)

I divide it to twenty bins like so:

cut(x, breaks=seq(0,1,by=0.05),include.lowest = TRUE)

How do I retrieve the number of elements that "fell" in each bin? For example, how can I tell there are 5 items in the bin [0,0.05]?

Many thanks!!

N.M
  • 685
  • 1
  • 9
  • 22

0 Answers0