Skip to content
Prev 8706 / 63424 Next

Determining the break points by hist() leads to errors (PR#2432)

volker.franz@tuebingen.mpg.de writes:
...for your data. There's a reason why the first breakpoint is
adjusted in the opposite direction, namely to get exact zeros counted
into the first bin. Of course since x in theory has a continuous
distribution, you in theory don't have observations on the boundary,
but in practice, theory and practice is not the same.

So the proper fix would be different. Currently we have

    h <- diff(breaks)
    equidist <- !use.br || diff(range(h)) < 1e-07 * mean(h)

which likely needs a larger tolerance since 

    diddle <- 1e-07 * max(abs(range(breaks)))

goes in both directions.