Skip to content

how the break is calculated by R?

2 messages · XinMeng, Richard Cotton

#
Hi all: 
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!
#
breaks."
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}}