Re: [Rcpp-devel] RcppArmadillo generates warning with arma_rng::set_seed_random()

2015-02-20 Thread Dirk Eddelbuettel
On 20 February 2015 at 13:14, terrance savitsky wrote: | When using - arma_rng::set_seed_random(), | to initialize the RNG in RcppArmadillo, the following warning is generated, | | When called from R, the RNG seed has to be set at the R level via set.seed() | | | This warning seems appropriate

[Rcpp-devel] RcppArmadillo generates warning with arma_rng::set_seed_random()

2015-02-20 Thread terrance savitsky
When using - arma_rng::set_seed_random(), to initialize the RNG in RcppArmadillo, the following warning is generated, When called from R, the RNG seed has to be set at the R level via set.seed() This warning seems appropriate when using set_seed(), but not set_seed_random() since setting a rando

Re: [Rcpp-devel] assert() for Rcpp?

2015-02-20 Thread JJ Allaire
> > This would still bypass the dror for the RNGscope object automatically added > by Rcpp::export right ? > Indeed it would. I think Dirk's example is really just an illustration of how we handle exceptions internally via the BEGIN/END macros and not something that user code should ever emulate

Re: [Rcpp-devel] assert() for Rcpp?

2015-02-20 Thread Romain Francois
Envoyé de mon iPhone > Le 18 févr. 2015 à 17:31, JJ Allaire a écrit : > > We *can* call Rf_error from C++ code, but when we do it bypasses all > C++ destructors on the stack, so we don't do it so as not leak memory > and otherwise have deterministic behavior around > construction/destruction.