Seeds the random number generator. Equivalent to R's set.seed().
Seeds the current generator, R's default RNGkind("Mersenne-Twister", "Inversion", "Rejection")
unless RNGkind chose another, so every r* function and sample/sampleInt produce the
same numbers as in R after the same seed. R's set.seed(seed, kind, sample.kind = ...) is
RNGkind({ kind, sampleKind }) followed by setSeed(seed) (R itself does the same). As in R
there is a single global stream shared by all functions; if no seed is set, one is chosen from
the clock or crypto.getRandomValues.
Parameters
seed: number
A 32-bit integer. Fractions are truncated toward zero.
Returns void
Throws
RangeError if seed is not finite or does not fit in a 32-bit integer.
Seeds the random number generator. Equivalent to R's
set.seed().Seeds the current generator, R's default
RNGkind("Mersenne-Twister", "Inversion", "Rejection")unless RNGkind chose another, so everyr*function andsample/sampleIntproduce the same numbers as in R after the same seed. R'sset.seed(seed, kind, sample.kind = ...)isRNGkind({ kind, sampleKind })followed bysetSeed(seed)(R itself does the same). As in R there is a single global stream shared by all functions; if no seed is set, one is chosen from the clock orcrypto.getRandomValues.