Truncated Poisson Random Variate Generator

/ Published in: R
Save to your folder(s)

Generates truncated Poisson random numbers.

Copy this code and paste it in your HTML
  1. rtpois <- function(N, lambda, k)
  2. qpois(runif(N, ppois(k, lambda), 1), lambda)

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.