rngSetSeed (Q157671)
From MaRDI portal
| This is the item page for this Wikibase entity, intended for internal use and editing purposes. Please use this page instead for the normal view: rngSetSeed |
Seeding the Default RNG with a Numeric Vector
| Language | Label | Description | Also known as |
|---|---|---|---|
| English | rngSetSeed |
Seeding the Default RNG with a Numeric Vector |
Statements
19 September 2023
0 references
A function setVectorSeed() is provided. Its argument is a numeric vector of an arbitrary nonzero length, whose components have integer values from [0, 2^32-1]. The input vector is transformed using AES (Advanced Encryption Standard) algorithm into an initial state of Mersenne-Twister random number generator. The function provides a better alternative to the R base function set.seed(), if the input vector is a single integer. Initializing a stream of random numbers with a vector is a convenient way to obtain several streams, each of which is identified by several integer indices.
0 references