Denis,
This is not reproducible. You show two functions, they both take arguments, you do not supply those. We cannot run this, so we cannot really help you. Please try rephrasing this as a _self-contained_ example. Now, it is always possibly that while the RNG seeds get reset properly on 'normal' C++ function brought to R via Rcpp, it may be that repeated use of Rcpp::Function as you aim to do may 'break that contract'. You should always be able to add the setter and getter of RNG seeds described in WRE yourself if need. But my advice would be to simplify to a self-contained example, and see if it reproduces with / without extended use of R functions called from Rcpp code. Cheers, Dirk -- dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org _______________________________________________ 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