[Rcpp-devel] repeatable random numbers

Dirk Eddelbuettel edd at debian.org
Thu Sep 1 19:15:54 CEST 2011

I should have written that quick function as follows:

   rngs <- cxxfunction(signature(), plugin="Rcpp", 
                       body="RNGScope z; return Rcpp::rnorm(5,0,1);")

You _do_ want RNGScope around; my bad for omitting it in the previous post.


Two new Rcpp master classes for R and C++ integration scheduled for 
New York (Sep 24) and San Francisco (Oct 8), more details are at

More information about the Rcpp-devel mailing list