The function `setVectorSeed(vseed)`

is provided, which allows to
initialize the R base Mersenne-Twister random number generator using
a numeric vector `vseed`

of an arbitrary nonzero length. The
transformation of `vseed`

into the initial state of Mersenne-Twister
is computed using AES (Advanced Encryption Standard). The precise
algorithm is described in `generateInitialization`

.

The directory "rngSetSeed/tests" contains tests, which

- (1)
compare the generated random numbers to stored precomuted ones,

- (2)
compare the initial states obtained using AES in C-level functions with initial states obtained using a (slow) implementation of AES in R-level functions included for test purposes.

setVectorSeed, generateInitialization.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.