sdrni {Nmix} | R Documentation |
Random number initialiser, allowing retrospective replication
Description
Front-end to standard R random number seed setter, allowing retrospective replication
Usage
sdrni(seed)
Arguments
seed |
non-negative integer random number seed, often 0 for absolute re-initialisation as with |
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
Value
seed
if input value is positive, otherwise the value that if used in a subsequent call will deliver exactly the same random numbers
Author(s)
Peter J. Green
Examples
sdrni(0)
runif(5)
keep<-sdrni(0)
runif(5)
sdrni(keep)
runif(5)
[Package Nmix version 2.0.5 Index]