Hi Florian, On 21 October 2013 at 10:59, Florian Oswald wrote: | I've noted that I cannot return an Rcpp::List longer than 20 elements. In | particular, this here compiles: [...] | whereas it does not if you uncomment element "x20" with the error message | | no matching function for call to ‘Rcpp::Vector<19>::create | (Rcpp::traits::named_object<int>, ... | | from which I deduce that the Rcpp::List is an Rcpp::Vector of length 20. Was | there any strong reason to stop at 20 elements?
Please see the list archives for a more extended discussion of this, it is a known topic. The short answer is: embed a list within a list, which you can recursively to reach as many elements as you want, or until you run out memory. Expanding the list beyond 20 has cost in terms of autogenerated headers. Hope this helps, Dirk -- Dirk Eddelbuettel | [email protected] | http://dirk.eddelbuettel.com _______________________________________________ Rcpp-devel mailing list [email protected] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
