install.packages("Hmisc") library("Hmisc") summary(cut2(x$plays, g=5))
> summary(cut2(x$plays, g=5)) [ 1, 5) [ 5, 11) [11, 25) [25, 52) [52,833] 9040 7104 8458 7784 7902 > xn <- subset(x$plays, x$plays >= 5 & x$plays <= 11)