[Rcpp-devel] for loop and random draws

Dirk Eddelbuettel edd at debian.org
Tue Oct 1 17:14:36 CEST 2024


On 1 October 2024 at 09:59, Dirk Eddelbuettel wrote:
| 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.

I missed the lines at the bottom past your signature, so I was wrong. My bad.

I would still encourage you to _simplify_. You have a pair of moderately
complex functions, and they do not reproduce the same results after two runs
despite re-seeding. So I would trim elements from them one by one to see
which removal leads to identical results. Or, inversely, start from twice
drawing from an RNG after reseed and assert first that the draws are
identical. Then add your processing.

Dirk

-- 
dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org


More information about the Rcpp-devel mailing list