> As to hist,the help file says:" R's default with equi-spaced breaks > (also the default) is to plot the counts in the cells defined by breaks." > I wanna know how the break is calculated by R? > > In other words: break = (max - min)/(number of group) but how the > "number of group" is calculated by R? Thanks!
If you look closely at the help page for hist, you'll see that in the Usage section it says breaks="Sturges". Then in the Arguments section it says that when breaks is a character string, it means it is the name of a method to compute the number of cells. Finally, in the Details section, it tells you to look at the nclass.Sturges help page for details of Sturges' algorithm. Wikipedia has a good description of common alorgithms for calculating the number of breaks. http://en.wikipedia.org/wiki/Histogram#Number_of_bins_and_width Regards, Richie. Mathematical Sciences Unit HSL ------------------------------------------------------------------------ ATTENTION: This message contains privileged and confidential inform...{{dropped:20}} ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.