| CppRNG | R Documentation |
Wrapper around a C++ random number generator object (for reproducibility).
The class persists a C++ random number generator throughout an R session to
ensure a given seed generates the same outputs (on the same OS). If no seed is provided,
the C++ random number generator is initialized using std::random_device.
rng_ptrExternal pointer to a C++ std::mt19937 class
new()Create a new CppRNG object.
CppRNG$new(random_seed = -1)
random_seed(Optional) random seed for sampling
A new CppRNG object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.