<div dir="ltr">Hi,<div><br></div><div>In R I have a list containing another list with a named element "p" containing a NumericVector. In other words:</div><div><br></div><div><div>> recProb[[1]]$p</div><div>[1] 0.2855202 0.6731716 0.8497825 0.7445254 0.2382722</div>
</div><div><br></div><div>I want to copy this into a NumericVector in Rcpp.</div><div><br></div><div>I tried using...</div><div><br></div><div>NumericVector nv = clone(recProb[i]["p"]);</div><div><br></div><div>
...and various other ways with no luck. (i is a variable in a loop.)</div><div><br></div><div>What's the best way to do this with the clearest code? Any advice would be greatly appreciated.</div><div><br></div><div>Cheers,</div>
<div>Dion</div><div><br></div><div>-- <br><div dir="ltr"><div>Dion C. Detterer</div><div>PhD Candidate, Computational Biology</div><div>School of Science and Technology</div><div>The Centre for Genetic Analysis and Applications</div>
<div>University of New England, Armidale, Australia</div></div></div></div>