[Rcpp-devel] Setting the R random seed from Rcpp

Krzysztof Sakrejda krzysztof.sakrejda at gmail.com
Fri Jun 7 18:22:09 CEST 2013


On Jun 7, 2013 12:12 PM, "Dirk Eddelbuettel" <edd at debian.org> wrote:
> Maybe what you want is more easily done with the RNGs from C++ (esp
C++11),
> Boost, ... or something different from R.   It may work, but we are
> (currently) simply not set up for it.

If you go with something different from R, I've had good luck with Tina's
RNG. (TRNG)  It's a fairly complete, fast, and easy to use C++ library...
there might even be a reason to wrap it for Rcpp someday.

Krzysztof

>
> The model is to call set.seed(somenumber) from R before going to C++, and
> being assured that a) you get the same stream in C++ as you would in R as
> well as b) that you can continue fine in R once you are back.
>
> What you want is a little different.  It may well be supported, but maybe
> just not (yet ?) by us. Or it may not be supported.  Please keep working
at
> it, this would be useful to sort this out.
>
> Just because you can get the integer seed via R from C++ does yet mean
that
> the generator is a sane state.  Just saying...
>
> Dirk
>
> --
> Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
> _______________________________________________
> Rcpp-devel mailing list
> Rcpp-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20130607/fd0d66bc/attachment.html>


More information about the Rcpp-devel mailing list