[R] Sample Poisson Distribution

Thor spencer.tapia at ntlworld.com
Wed Feb 7 19:02:32 CET 2007


Hi,
 I'm completely new to R, I am all at sea with the interface and the
confusing help files, so would appreciate some help to do a simple task.

Need to present the mean and variance of 100 different samples of poisson
distributions (N=1000, with fixed lambda) in a file in two columnns, and
then produce histograms.

So far I have figured out:

> N <- 1000
>  x <- rpois(N, 3.1) ,

and 
> var(x) 
and 
> mean(x)
, and I've seen the hist command, just need to tie it all together.  I read
that loops aren't really used in R, so what do i need to do?

thanks
-- 
View this message in context: http://www.nabble.com/Sample-Poisson-Distribution-tf3188621.html#a8850775
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list