From ripley@stats.ox.ac.uk  Fri Jan 31 20:40:03 2003
From: ripley@stats.ox.ac.uk (Prof Brian D Ripley)
Date: Fri Jan 31 20:40:03 2003
Subject: [Rd] hist (PR#2512)
In-Reply-To: <Pine.LNX.4.44.0301311953290.1139-100000@kleigh.nl>
Message-ID: <Pine.GSO.4.44.0301311934370.9551-100000@auk.stats>

On Fri, 31 Jan 2003, Peter Kleiweg wrote:

> __ aldus surko@salk.edu __
>
> > The command hist(c(2,2,2,4,5,6)) returns a histogram that looks incorrect -- 3 in the bin labeled 2 on the left, but 1 each in the bins labeled 3,4,5 on the left.
>
>
> That looks as it is supposed to look, according to the help
> page. However, if I run this example with include.lowest=FALSE,
> I get an error:
>
>     > hist(c(2,2,2,4,5,6),include.lowest=FALSE)
>     Error in hist.default(c(2, 2, 2, 4, 5, 6), include.lowest = FALSE) :
>         some `x' not counted; maybe `breaks' do not span range of `x'
>
> Similar if I add right=FALSE:
>
>     > hist(c(2,2,2,4,5,6),include.lowest=FALSE,right=FALSE)
>     Error in hist.default(c(2, 2, 2, 4, 5, 6), include.lowest = FALSE, right = FALSE) :
>         some `x' not counted; maybe `breaks' do not span range of `x'
>
>
> Is this supposed to happen?

Yes.

-- 
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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] hist (PR#2512)
Prof Brian D Ripley