dse (version R2000.6-1)

set.RNG: Set the random number generator

Description

Set the random number generator.

Usage

set.RNG(kind=NULL, seed=NULL, normal.kind=NULL)

Arguments

Value

  • The old setting.

item

  • kind
  • seed
  • normal.kind

Details

Sets the uniform and normal random number generators and the seed. The function random.number.test()) can be used to check that the function is working properly. The old setting is returned in a format which can be used in another call to set.RNG. (This would reset to the original value.) If no arguments are given the current setting is returned. In R see RNGkind for more details. Sets global variables controlling the uniform and normal random number generators and the global seed. set.seed RNGkind runif rnorm set.RNG(kind="Wichmann-Hill", seed=c(979,1479,1542), normal.kind="Box-Muller") rnorm(10) random.number.test() syskern OS S/R