[Rd] hist (PR#2512)
Peter Dalgaard BSA
p.dalgaard@biostat.ku.dk
Fri Jan 31 18:33:02 2003
surko@salk.edu writes:
> 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.
>
> Thanks!
> Pam Surko
As documented (notice the include.lowest argument), so not a bug. Also S-PLUS
compatible.
Histogramming of integers has these pitfalls. For an alternative, you
might want to look up truehist() in the MASS package.
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907