I believe a negative binomial distribution with
size == Inf should behave like a Poisson distribution.
Currently NaNs are returned for most input.
Please find below some simple code.
# [dpqr]dnbinom(0, mu = mu, size = Inf) are undefined (NaN):
mu <- 5
dnbinom(0:3, mu = mu, size = Inf)
pnbinom(0:3, mu = mu, size = Inf)
qnbinom(0.3, mu = mu, size = Inf)
rnbinom(3, mu = mu, size = Inf)
# This is what should be obtained:
Your assessment is entirely correct, thank you!
I will address this.
Patch committed (svn rev 70234) a few minutes ago to R-devel.
To be ported to R-patched -- for R 3.2.4 -- in two days or so.
Note that rnbinom(n, size=Inf, mu=mu) will not return the same random numbers
as rpois(n, mu) -- but rather the same as rnbinom(n, size=<very large>, mu=mu).