<div dir="ltr"><div><div><div>Hi everyone,<br><br></div></div><div><div>I am porting some code from the old API to the new API like in the following example.<br><br>-      SEXP ret = R_NilValue;<br></div><div><div>-      RcppResultSet rs;<br>

-      rs.add("foo1", bar1);<br>
-      rs.add("foo2", bar2);<br>-      ret = rs.getReturnList();<br><br>+     SEXP ret = R_NilValue;<br>+     ret = Rcpp::List::create(Rcpp::Named("foo1")  = bar1<br>+                                       Rcpp::Named("foo2")  = bar2);<br>


<br></div><div>This works well if I have less than 20 elements.<br><br></div>But how can I add new elements to the list, including assigning names ?<br></div><div>Is there an alternative way to create the list without using Rcpp::List::create ?<br>

</div><div><br></div><br></div>Thanks<br></div><br>-Dominique<br></div>