Message-ID: <42310AE7.4050505@metahuman.org>
Date: 2005-03-11T03:05:11Z
From: Martin C. Martin
Subject: sample function
In-Reply-To: <BAY10-F303206AF04A6B0EE46602FC7530@phx.gbl>
"hist" is lumping things together.
Try:
sum(temp == 0)
compare to the height of the left most bar.
Is this a bug in hist?
- Martin
mirage sell wrote:
> Hi everyone, I need help.
> I want to have a "uniform" kind distribution. When I used sample
> function I got almost twice many zeros compared to other numbers. What's
> wrong with my command ?
>
> temp <-sample(0:12, 2000, replace=T,prob=(rep(1/13,13)))
> hist(temp)
>
> Thanks in advance,
>
> Taka,
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html