Re: [Rcpp-devel] Setting seed using Rcpp

2018-02-07 Thread Hmamouche Youssef
Thank you all for these answers. If you try "rcpp random number generation" in a search engine, the first line will point to http://gallery.rcpp.org/articles/random-number-generation/ which probably has your answer. Best, Serguei Yes of course i tried http://gallery.rcpp.org/articl es/ra

Re: [Rcpp-devel] Setting seed using Rcpp

2018-02-07 Thread Hao Ye
Hi Youssef, Rcpp has sugar for the R random number generators. This is nice if you want to let your users set the random seed in R code outside of the package for reproducibility: http://gallery.rcpp.org/articles/random-number-generation/ Alternatively, if you enable C++11, there are some random

Re: [Rcpp-devel] Setting seed using Rcpp

2018-02-07 Thread Dirk Eddelbuettel
On 7 February 2018 at 16:20, Hmamouche Youssef wrote: | Hi, | | I get a note from R CMD check for an Rcpp package: | | Found ‘_srand’, possibly from ‘srand’ | | Found no calls to: ‘R_registerRoutines’, ‘R_useDynamicSymbols’ | | | Is there some an equivalent function for srand from Rcpp, w

Re: [Rcpp-devel] Setting seed using Rcpp

2018-02-07 Thread Serguei Sokol
Le 07/02/2018 à 16:20, Hmamouche Youssef a écrit : Hi, I get a note from R CMD check for an Rcpp package: Found ‘_srand’, possibly from ‘srand’ Found no calls to: ‘R_registerRoutines’, ‘R_useDynamicSymbols’ Is there some an  equivalent function for srand from Rcpp, which i can use it insid

[Rcpp-devel] Setting seed using Rcpp

2018-02-07 Thread Hmamouche Youssef
Hi, I get a note from R CMD check for an Rcpp package: Found ‘_srand’, possibly from ‘srand’ Found no calls to: ‘R_registerRoutines’, ‘R_useDynamicSymbols’ Is there some an equivalent function for srand from Rcpp, which i can use it inside c++ code? Best regards, Youssef _