rni: Random number initialiser supporting spontaneous replication
Description
Random number initialiser supporting spontaneous replication
Usage
rni(seed=0)
Value
Non-zero seed value that can be used to reproduce run subsequently
Arguments
seed
Integer, seed
Author
Peter Green (P.J.Green@bristol.ac.uk)
Details
This is a convenience front end to set.seed. A non-zero value of seed is passed directly to set.seed. Given a zero value (the default), the function calls Sys.time to generate an unpredictable starting value -- but the value ultimately passed to set.seed is both output using cat and returned invisibly, so can be used for unanticipated replica runs of a simulation.