powered by
Set the RNG Seed from within Rcpp
setSeed(seed)
An unsigned int that is the seed one wishes to use.
unsigned int
A set RNG scope.
# NOT RUN { set.seed(10) x <- rnorm(5, 0, 1) setSeed(10) y <- rnorm(5, 0, 1) all.equal(x, y, check.attributes = FALSE) # }
Run the code above in your browser using DataLab