[Rcpp-devel] Random matrix row and column permutations in RcppEigen

Dirk Eddelbuettel edd at debian.org
Sat Jun 1 22:34:01 CEST 2013


Hi Kouros,

On 1 June 2013 at 16:13, owzar001 at duke.edu wrote:
| The problem is that I cannot (or do not know how to) use the R random seeding
| mechanism to make the permutation resampling process
| reproducible. I would appreciate any advice on this matter (e.g.,  replacing
| std::random_shuffle with a suitable Rcpp function or to be  pointed to
| existing solutions ). 

No direct solution for you but 

  a) you can probably seed the standard library RNGs as well (which may just
     need a helper function) 

  b) you can look at the very nice sample() function contributed to
     RcppArmadillo and see if you can cook something similar up for
     RcppEigen.

There are posts on the Rcpp Gallery about b).

Dirk

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com


More information about the Rcpp-devel mailing list