R/rtpois.R

Defines functions rtpois

Documented in rtpois

rtpois <-
function(N, lambda=NA)
{
   if (is.na(lambda) == TRUE) return(NA)
   qpois(runif(N, dpois(0, lambda), 1), lambda)
}

Try the survsim package in your browser

Any scripts or data that you put into this service are public.

survsim documentation built on Dec. 14, 2021, 5:09 p.m.