library(agricolae)
# example 1
data(growth)
attach(growth)
h2<-hist(height,plot=FALSE)
detach(growth)
intervals.freq(h2$breaks)
# example 2
x<-seq(10,40,5)
y<-c(2,6,8,7,3,4)
intervals.freq(x)
Run the code above in your browser using DataLab