Message-ID: <16074.19419.594372.899471@coredump.wu-wien.ac.at>
Date: 2003-05-20T15:38:03Z
From: Guenter Tirler
Subject: problems with hist()
Hi,
I try to compute the counts of a histogram of random numbers. But I
get different results depending on the limits (-10,10) or (-1000,1000)
although all numbers are in the interval (-10,10).
Have I done somthing wrong?
> x<-rnorm(1e6)
> s1<-hist(x, br =c(-1000,-1,-0.5,0,0.5,1,1000),plot=FALSE)[[2]]
> s2<-hist(x, br =c(-10,-1,-0.5,0,0.5,1,10),plot=FALSE)[[2]]
> sum(s1)
[1] 1000000
> sum(s2)
[1] 1000000
> s1
[1] 159035 149461 192003 191478 149789 158234
> s2
[1] 159009 149452 192004 191464 149805 158266
Thanks
G?nter