Learn R Programming

RcppArmadillo (version 14.0.2-1)

armadillo_set_seed: Set the Armadillo Random Number Generator to the given value

Description

Set the Armadillo Random Number Generator to the given value

Usage

armadillo_set_seed(val)

Value

The function is invoked for its side effect and has no return value.

Arguments

val

The seed used to initialize Armadillo's random number generator.

Details

Depending on whether RcppArmadillo was compiled for the C++98 standard (currently the default) or for C++11 (optional), two different RNGs may be used. This function resets either. For C++98, the R programming language's RNG is used. For C++11, the RNG included in the <random> library is used only when #define ARMA_USE_CXX11_RNG is placed before #include <RcppArmadillo.h>. Otherwise, the R programming language's RNG will be used.

See Also

The R documentation on its RNGs all of which are accessible via Rcpp.