[Rd] weird breaks in hist (PR#2431)

ripley@stats.ox.ac.uk ripley@stats.ox.ac.uk
Wed Jan 8 16:28:05 2003


On Wed, 8 Jan 2003, Reinhold Koch wrote:

> Thanks for the details of this feature,
>
> I wanted all values been treated equally. I now achieved this through
>
> hist(1:4, br=0:4,include.lowest=F)
>
> quote:
> > > hist(1:4)
> > >
> > > always merges up the first two columns,
> >
> > Why is that wierd?  You requested three bins and that's what you got.
> > (If you didn't know you had done that, please read the help page.)
>
> In the help pages I could not find this; the default bin number
> algorithm nclass.Sturges gives for 1:3 3 bins as a result, but hist(1:3)
> draws 4.

It says

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

so what about that sentence do you fail to comprehend?

-- 
Brian D. Ripley,                  ripley@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