<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb adM"><div class="h5">
|     Also, you may need to add RNGScope() if you use R's RNG.<br>
|<br>
|<br>
|<br>
| Yes, I should have mentioned that in my post.  Calling RNGScope() is left to<br>
| the user, since multiple calls to sample() can conceivably happen inside a<br>
| single RNGScope().<br>
<br>
</div></div>With that, maybe best to be included as another example in RcppArmadillo ?</blockquote></div><br>Why?  The proposed behavior is the same as sugar's rnorm, etc.: a utility function that uses R's RNG -- it's the <br>

user's responsibility to properly scope the RNG.  <br><br>When time permits, I'll add Romain's comments on sugarizing sample (which I *think* I understand), along with some testing code.<br clear="all"><br>best,<br>

Christian<br>-- <br>A man, a plan, a cat, a ham, a yak, a yam, a hat, a canal – Panama!<br>