[Rd] Error message for infinite probability parameters in rbinom() and rmultinom()

2023-04-08 Thread Christophe Dutang
Dear all, Using rmultinom() in a stochastic model, I found this function returns an error message 'NA in probability' for an infinite probability. Maybe, a more precise message will be helpful when debugging. > rmultinom(1, 3:5, c(1/2, 1/3, Inf)) Error in rmultinom(1, 3:5, c(1/2, 1/3, Inf))

Re: [Rd] Error message for infinite probability parameters in rbinom() and rmultinom()

2023-04-08 Thread Martin Maechler
> Christophe Dutang > on Sat, 8 Apr 2023 14:21:53 +0200 writes: > Dear all, > Using rmultinom() in a stochastic model, I found this function returns an error message 'NA in probability' for an infinite probability. > Maybe, a more precise message will be helpful when d

Re: [Rd] Error message for infinite probability parameters in rbinom() and rmultinom()

2023-04-08 Thread Duncan Murdoch
On 08/04/2023 5:53 p.m., Martin Maechler wrote: Christophe Dutang on Sat, 8 Apr 2023 14:21:53 +0200 writes: > Dear all, > Using rmultinom() in a stochastic model, I found this function returns an error message 'NA in probability' for an infinite probability. > Maybe, a mo