I am following the examples from a french book on R. For french speakers, the book's title is: "Modélisation prédictive et apprentissage statistique avec R" from "Stéphane Tufféry".
At some point, in chapter 2, on needs to invoke the linear congruential generator through set.generator().
It seems that this generator is not available anymore in set.generator():
library(randtoolbox)
a <- 397204094
b <- 0
m <- 2^(31)
set.generator(name="congruRand", mod=m, mult=a, incr=b, seed=123)
Error in match.arg(name) : 'arg' should be one of “WELL”, “MersenneTwister”, “default”
Although still being documented in: randtoolbox , it seems that this generator is not available in my session. When calling the help (?set.generator) from R, I am getting the following signature:
set.generator(name=c("WELL", "MersenneTwister", "default"),
parameters=NULL, seed=NULL, ..., only.dsc=FALSE)
I am using the same version of randtoolbox (randtoolbox_1.30.1) as in the documentation.
I point out that I want to use this random generator for the sake of reproducibility with the book.
What am I doing wrong?
Aucun commentaire:
Enregistrer un commentaire