On 15 November 2012 at 04:00, Christian Gunning wrote: | | Also, you may need to add RNGScope() if you use R's RNG. | | | | | | | | Yes, I should have mentioned that in my post. Calling RNGScope() is left | to | | the user, since multiple calls to sample() can conceivably happen inside | a | | single RNGScope(). | | With that, maybe best to be included as another example in RcppArmadillo ? | | | Why? The proposed behavior is the same as sugar's rnorm, etc.: a utility | function that uses R's RNG -- it's the | user's responsibility to properly scope the RNG.
Fair point. | When time permits, I'll add Romain's comments on sugarizing sample (which I | *think* I understand), along with some testing code. Excellent plan. Dirk -- Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com _______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel