Provided within is a high quality and fast PPRNG that is able to be used in an 'OpenMP' parallel environment compiled under either C++98 or C++11. The objective of this package release is to consolidate the distribution of the 'sitmo' library on CRAN by enabling others to link to the 'sitmo' header file instead of including a copy of 'sitmo' within their individual package. Lastly, the package contains example implementations using 'sitmo' and two accompanying vignette that provide additional information.
The repository houses the
sitmo R package for Parallel Psuedo Random Number Generation (PPRNG). The package provides a way to obtain the
sitmo header files via LinkTo.
sitmo is currently only available on GitHub, but should also be available on CRAN shortly. To install the package, you must first have a compiler on your system that is compatible with R.
For help on obtaining a compiler consult:
With a compiler in hand, one can then install the package from GitHub by:
sitmo in your R package, modify the
DESCRIPTION file by adding:
LinkingTo: Rcpp, sitmo Imports: Rcpp (>= 0.12.3)
To use C++11's statistical distributions, you may want to add the following to your
CXX_STD = CXX11
C++ file, then add:
Below is a hello world example meant to show a basic implementation of
// C++11 RNG library// SITMO PPRNG// [[Rcpp::export]]Rcpp::NumericVector