Hi,

In R I have a list containing another list with a named element "p"
containing a NumericVector. In other words:

> recProb[[1]]$p
[1] 0.2855202 0.6731716 0.8497825 0.7445254 0.2382722

I want to copy this into a NumericVector in Rcpp.

I tried using...

NumericVector nv = clone(recProb[i]["p"]);

...and various other ways with no luck. (i is a variable in a loop.)

What's the best way to do this with the clearest code? Any advice would be
greatly appreciated.

Cheers,
Dion

-- 
Dion C. Detterer
PhD Candidate, Computational Biology
School of Science and Technology
The Centre for Genetic Analysis and Applications
University of New England, Armidale, Australia
_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to