I was using the package HistogramTools in R to create Histogram.
> H<-hist(1:100)
> sum(H$density)
[1] 0.1
Somehow the sum of the density is not 1, regardless of the data I use (I have tried several generated random data as well, and it is also not 1)
but then,
> sum(H$counts)
[1] 100
the total counts match the total number of data.
Am I wrong in understanding "density" or "relative frequency"??
H
. $\endgroup$ – whuber♦ Sep 23 '19 at 19:54