rni {KinMixLite}R Documentation

Random number initialiser supporting spontaneous replication

Description

Random number initialiser supporting spontaneous replication

Usage

rni(seed=0)

Arguments

seed

Integer, seed

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.

Value

Non-zero seed value that can be used to reproduce run subsequently

Author(s)

Peter Green (P.J.Green@bristol.ac.uk)

Examples

rni(0)
runif(6)
rni(0)
runif(6)
rni(3456)
runif(6)
rni(3456)
runif(6)
keep<-rni(0)
print(keep)
runif(6)
rni(keep)
runif(6)

[Package KinMixLite version 2.1.0 Index]