[Rcpp-devel] Rcpp::List::create(...) with more than 20 elements ?
Dominique Belhachemi
domibel at debian.org
Wed Apr 17 15:54:17 CEST 2013
Hi everyone,
I am porting some code from the old API to the new API like in the
following example.
- SEXP ret = R_NilValue;
- RcppResultSet rs;
- rs.add("foo1", bar1);
- rs.add("foo2", bar2);
- ret = rs.getReturnList();
+ SEXP ret = R_NilValue;
+ ret = Rcpp::List::create(Rcpp::Named("foo1") = bar1
+ Rcpp::Named("foo2") = bar2);
This works well if I have less than 20 elements.
But how can I add new elements to the list, including assigning names ?
Is there an alternative way to create the list without using
Rcpp::List::create ?
Thanks
-Dominique
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20130417/adce5c41/attachment.html>
More information about the Rcpp-devel
mailing list