### How best to efficiently store positive integers in R arrays (or similar data structures) [closed]

I am working on an iterative algorithm in R that fills a large array with positive integers according to a prespecified probability distribution. This array can be quite large, for example 10000 rows by 1000 columns. Once values are placed in the array, column means are computed. x <- array(1:(10000 * 1000), dim = c(10000,…

Details