Hi Dirk,
sorry for reposting. I thought this was specifically about getting the second
approach of Matteo run in the same way as the first one.
Yeah, the RNG thing is something I myself haven't yet figured totally out.
Especially in regard to Matteo's note, that the final task should run in
pa
Simon,
On 10 June 2013 at 20:22, Simon Zehnder wrote:
| this is an interesting post. My assumption is, that as in the first approach
I fear tou may be a couple of posts late. Please see
http://thread.gmane.org/gmane.comp.lang.r.rcpp/5651
Thanks, Dirk
--
Dirk Eddelbuettel | e...@debian.or
Hi Matteo,
this is an interesting post. My assumption is, that as in the first approach
you call an R function which is implemented as a pointer (or reference to an R
function) this function always has access to the RNG scope. Whereas in the
second approach you call nested, which is a CPP-funct
Hi all,
I continued experimenting with setting the R seed from an
Rcpp function. While this code works:
cppFunction('
List myFun(int n, Function foo)
{
RNGScope scope;
Environment g = Environment::global_env();
Environment::Binding RandomSeed = g[".Random.seed"];
IntegerVector