Hi all, this is my first question here:
I have in R a list with several elements, some of them are lists, in the vein of this: mylist <- vector("list",10) for(m in 1:10){ mylist[[m]]$ID <- m mylist[[m]]$num <- vector("list",5) mylist[[m]]$num2 <- vector("list",5) } Is there a way to pass a data structure like this to a Rcpp function, convert it to an appropriate C++ structure, and after doing some work with it, return it in its original form? fun <- cxxfunction(signature(x='List'), plugin='Rcpp', body = ' using namespace std; List templist(x); //operations... return(wrap(templist)); ') Surely I am missing something obvious here, but I am just arrived to Rcpp, and after looking in the documentation, I haven't found anything similar. Thank you in advance David
_______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel