Re: [R] Generating a value

From: <Bill.Venables_at_csiro.au>
Date: Sat, 1 Dec 2007 16:37:31 +1000

Here's how to generate a million

psample <- rpois(1000000, lambda = 20)

so guess how you would generate one.

The main point is that if you really want to generate more than one, do it all at once like the above, do not do it in a loop.

Bill Venables
CSIRO Laboratories
PO Box 120, Cleveland, 4163
AUSTRALIA

Office Phone (email preferred): +61 7 3826 7251
Fax (if absolutely necessary):  +61 7 3826 7304
Mobile:                         +61 4 8819 4402
Home Phone:                     +61 7 3286 7700
mailto:Bill.Venables_at_csiro.au
http://www.cmis.csiro.au/bill.venables/

-----Original Message-----
From: r-help-bounces_at_r-project.org [mailto:r-help-bounces_at_r-project.org] On Behalf Of alfieim29
Sent: Saturday, 1 December 2007 6:21 AM
To: r-help_at_r-project.org
Subject: [R] Generating a value

How do I generate a value in R from a poisson distribution with mean 20?

Thanks!

-- 
View this message in context:
http://www.nabble.com/Generating-a-value-tf4922234.html#a14086120
Sent from the R help mailing list archive at Nabble.com.


______________________________________________
R-help_at_r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
______________________________________________
R-help_at_r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Received on Sat 01 Dec 2007 - 06:42:54 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 01 Dec 2007 - 07:30:16 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.