[Rd] hist (PR#2512)

Peter Kleiweg kleiweg@let.rug.nl
Fri Jan 31 19:59:02 2003


__ 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?

-- 
Peter Kleiweg
http://www.let.rug.nl/~kleiweg/