[R] histogram cells

Prof Brian Ripley
Sat, 28 Jun 2003 06:48:19 -0000

?hist says

 breaks: one of:

...
             *  a single number giving the number of cells for the
                histogram,

...

          In the last three cases the number is a suggestion only.


On Fri, 27 Jun 2003, Tommy E. Cathey wrote:

> Why does the following code generate a Histogram of 7 cells
> instead of 5?

> > data(islands)
> > str(hist(sqrt(islands), br = 5, col="lightblue",
border="pink"))
> List of 7


--
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595