[Rcpp-devel] Sample function(s) for inclusion in RcppArmadillo
Christian Gunning
xian at unm.edu
Thu Nov 15 12:00:53 CET 2012
>
> | Also, you may need to add RNGScope() if you use R's RNG.
> |
> |
> |
> | Yes, I should have mentioned that in my post. Calling RNGScope() is
> left to
> | the user, since multiple calls to sample() can conceivably happen inside
> a
> | single RNGScope().
>
> With that, maybe best to be included as another example in RcppArmadillo ?
Why? The proposed behavior is the same as sugar's rnorm, etc.: a utility
function that uses R's RNG -- it's the
user's responsibility to properly scope the RNG.
When time permits, I'll add Romain's comments on sugarizing sample (which I
*think* I understand), along with some testing code.
best,
Christian
--
A man, a plan, a cat, a ham, a yak, a yam, a hat, a canal – Panama!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20121115/7c00bf6a/attachment.html>
More information about the Rcpp-devel
mailing list