set.vector.seed: Seeding the generator with a numeric vector

Description Usage Arguments Details Value

View source: R/init.R

Description

The function allows to seed the generator with a numeric vector of an arbitrary length.

Usage

1

Arguments

seed

A numeric or integer vector, whose components have integer values in the interval [0, 2^32-1].

Details

Function set.vector.seed() generalizes the initialization "mrg32k5a" for longer seeds.

The input numbers should have integer values in the interval [0, 2^32 - 1]. They may be represented by numeric data type (double precision). If some of the components of the vector seed is at least 2^31, then the numeric type is necessary.

If seed has length 1 and 0 <= seed <= 2^31 - 1, then set.vector.seed(seed) with "mrg32k5a" initialization is equivalent to set.seed(seed). If seed has length 1 and 2^31 + 1 <= seed <= 2^32 - 1, then set.vector.seed(seed) with "mrg32k5a" initialization is equivalent to set.seed(seed - 2^32).

Every two different input vectors of length at most 3 produce different initial states of WELL19937a. The bit pattern of the seed is not important. In particular, the seeds 0, 1, or 2 are not worse than any other seed and produce unrelated sequences.

Value

NULL invisibly.


rngwell19937 documentation built on May 2, 2019, 8:33 a.m.