<meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="font-family: &#39;Droid Sans&#39;, arial, sans-serif; font-size: 13px; border-collapse: collapse; color: rgb(32, 32, 32); ">Hi all,<div>

<br></div><div>I&#39;m just getting my feet wet with some Rcpp.  I&#39;m comfortable with R but new to C++.  In the Rcpp vignettes, I found some of the R-like functions for sampling from distributions (runif, rnorm, etc), but I didn&#39;t see a function mimicking sample(). I checked the list of unit tests and didn&#39;t see it there either.  Have I missed it?  Is there a C++ function I should be using to sample (with replacement in my particular situation) from a vector (with provided weights).</div>

<div><br></div><div>Thanks for any pointers,</div><div>Chris</div></span>