sdrni: Random number initialiser, allowing retrospective replication
Description
Front-end to standard R random number seed setter, allowing retrospective replication
Usage
sdrni(seed)
Value
seed if input value is positive, otherwise the value that if used in a subsequent call will deliver exactly the same random numbers
Arguments
seed
non-negative integer random number seed, often 0 for absolute re-initialisation as with set.seed(NULL)
Author
Peter J. Green
Details
Using sdrni to initialise random number stream allows a decision to repeat a simulation exactly, presumably with additional outputs, need only be made after seeing results; see Examples