randp,
which is redefined by RcppOctave to call the R base function
rpois.
This enables to exactly reproduce stochastic computations in R and Octave,
without changing the original Octave/Matlab code.
See o_runif for more details.o_rpois(n, p = n, lambda)n)[Generated from Octave-
# Draw random poisson values (in vector form) set.seed(123) o_rpois(1, lambda = 4) o_rpois(1, 10, 4)
# Draw random poisson values (in matrix form) set.seed(123) o_rpois(2, lambda = 4) o_rpois(2, 5, lambda = 4)
randp as provided by
RcppOctave, which returns the draws as double.
The result is converted into integer to match the behaviour of
rpois