[R] hist densities

Luke Spadavecchia l.spadavecchia at googlemail.com
Fri Mar 21 15:36:45 CET 2008


Hi there,

I was wondering why

x<-rnorm(n=5000,mean=1.5,sd=0.25)
h<-hist(x)
sum(h$density)

[1] 10

I thought the integral of the histogram should be one? These seems  
strange to me, or am I being silly...

Regards Luke Spadavecchia

PS. I'm using R 2.5.1 on Mac OSX



More information about the R-help mailing list