/ Published in: R
Generates truncated Poisson random numbers.
Expand |
Embed | Plain Text
rtpois <- function(N, lambda, k) qpois(runif(N, ppois(k, lambda), 1), lambda)
You need to login to post a comment.
Generates truncated Poisson random numbers.
rtpois <- function(N, lambda, k) qpois(runif(N, ppois(k, lambda), 1), lambda)
You need to login to post a comment.