[Rcpp-devel] How to create list of list without known structure

Florian Burkart florian.burkart at gmail.com
Tue May 6 09:35:48 CEST 2014


Hi,

I have been creating lists of lists with

return Rcpp::List::create(Rcpp::Named("vec") = someVector,
                          Rcpp::Named("lst") = someList,
                          Rcpp::Named("vec2") = someOtherVector);

or to follow Romain:

using namespace Rcpp ;
return List::create(
   _["vec"]  = someVector,
   _["lst"]  = someList,
   _["vec2"] = someOtherVector
 ) ;

But how do I convert the following into a list of lists?

std::vector<std::string> m_column_headers;
std::vector<std::vector<OptDouble> > m_vectors_of_values;

Thank you,
Florian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20140506/2e2d484c/attachment-0001.html>


More information about the Rcpp-devel mailing list