I'm working on a population dynamics simulation that involves integer generation. Due to the assumptions of my model, I'm generating random numbers through the rmultinom
function of R. However, I'm having overflow problems in my simulation.
The largest integer that R can generate is defined by .Machine$integer.max
. On my PC, this number is equal to 2147483648. In scientific notation, this value is approximately 2,147 x 10 ^ 9.
But many of the simulations that I push go beyond this limit. The size
parameter of the rmultinom
will be greater than 10 ^ (10) or even 10 ^ (12). And if so, I can not generate random numbers with the distribution I want.
What could I do to solve this problem? Any suggestions?