[R] sum(hist$density) == 2 ?!
Sam Steingold
sds at gnu.org
Wed Mar 14 06:25:10 CET 2012
> x <- rnorm(1000)
> h <- hist(x,plot=FALSE)
> sum(h$density)
[1] 2 ----------------------------- shouldn't it be 1?!
> h <- hist(x,plot=FALSE, breaks=(-4:4))
> sum(h$density)
[1] 1 ----------------------------- now it's 1. why?!
--
Sam Steingold (http://sds.podval.org/) on Ubuntu 11.10 (oneiric) X 11.0.11004000
http://www.childpsy.net/ http://www.memritv.org http://openvotingconsortium.org
http://thereligionofpeace.com http://mideasttruth.com http://palestinefacts.org
((lambda (x) `(,x ',x)) '(lambda (x) `(,x ',x)))
More information about the R-help
mailing list