myrng: Set seed for the MATLAB random number generator

View source: R/myrng.R

myrngR Documentation

Set seed for the MATLAB random number generator

Description

Initializes the MATLAB random generator

Usage

myrng(seed)

Arguments

seed

a single value, interpreted as an integer

Value

Integer, the seed value with which the MATLAB random number generator was initialized.

Author(s)

FSDA team, valentin.todorov@chello.at

Examples


 ## Not run: 
   data(wool)
   XX <- wool
   y <- XX[, ncol(XX)]
   X <- XX[, 1:(ncol(XX)-1), drop=FALSE]

   seed <- myrng()                       #i nitialized the RNG and keep the seed

   myrng(seed)                           # repeat the computations with the same seed
   (out2 <- fsreg(X, y, method="LTS"))

   all.equal(out1, out2)

 
## End(Not run)


fsdaR documentation built on March 31, 2023, 8:18 p.m.