I just pushed an example of how this could work (commit 9de80849a33394fee72deb2e8bce9417de41b485). importantly, the r function set.seed does not work with using std::mt19937 from within rcpp. i left a comment on line 15 of the file scr/randExample.cpp of where setting a set can happen. if we need to set a set, we'd have to modify this line in a way where the state of the R environment (i.e. the seed there) can be passed to the mt19937 generator
I just pushed an example of how this could work (commit 9de80849a33394fee72deb2e8bce9417de41b485). importantly, the r function
set.seed
does not work with usingstd::mt19937
from within rcpp. i left a comment on line 15 of the filescr/randExample.cpp
of where setting a set can happen. if we need to set a set, we'd have to modify this line in a way where the state of the R environment (i.e. the seed there) can be passed to the mt19937 generator