[R] rpois > 0

Rolf Turner rolf.turner at xtra.co.nz
Sat Oct 15 01:44:18 CEST 2011


On 15/10/11 10:15, knut-o wrote:
> Hello
> what is the easiest way to generate rpois(m,lambda) but only values greater
> than 0 and length = m.
> tanks, knut

The rpospois() function from the VGAM package is what you are looking for.

I found this by doing:

     RSiteSearch("truncated Poisson")

and scrabbling through the results a bit.

[Give a man a fish and you feed him for a day.  Teach a man
  to fish ... and you destroy an eco-system. :-) ]

     cheers,

         Rolf Turner



More information about the R-help mailing list