seed_seed: Seed Seed

Description Usage Arguments Value

View source: R/seed_seed.R

Description

First, seeds the random number generator with seed. Then generates a sequence of n random integers between 1 and .Machine$integer.max. Finally, seeds the random number generator with the nth (i.e. last) number in this sequence. The point of this function is that it may be used to seed the RNG at the start of a job that is run on a cluster, so that parallel jobs are using – if not statistically independent random number streams – at least not the exact same stream.

Usage

1
seed_seed(n, seed, ...)

Arguments

n

Number (e.g. id of parallel job)

seed

Initial seed; this should be set so that results are replicable

...

Further parameters passed to set.seed

Value

The final seed, i.e. the nth number in the sequence


hkauhanen/hipster documentation built on July 4, 2020, 11:25 p.m.