/ Published in: R
Generates truncated Poisson random numbers.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
rtpois <- function(N, lambda, k) qpois(runif(N, ppois(k, lambda), 1), lambda)