On 5/20/08, John Gant <[EMAIL PROTECTED]> wrote:
> Can someone help me with a misunderstanding I'm having with hist? I
> expected, from the example below, that the number of bins would always be 10
> and the length of the counts array the same. According to the help section
> 'breaks' can be a integer indicating the number of bins.
The help actually says:
breaks: one of:
* a vector giving the breakpoints between histogram
cells,
* a single number giving the number of cells for the
histogram,
* a character string naming an algorithm to compute the
number of cells (see 'Details'),
* a function to compute the number of cells.
In the last three cases the number is a suggestion only.
The last sentence explains your observation.
BTW, this was recently discussed:
https://stat.ethz.ch/pipermail/r-help/2008-May/162492.html
-Deepayan
______________________________________________
[email protected] 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.