On 30 May 2013 at 18:01, Romain Francois wrote: | Le 30/05/13 16:02, Dirk Eddelbuettel a écrit : | > | > On 30 May 2013 at 15:15, Romain Francois wrote: | > | More easily, you can use Rcpp::Reference: | > | | > | // [[Rcpp::export]] | > | std::string getId(Reference obj) { | > | std::string txt = obj.field("id"); | > | return txt; | > | } | > | > Thanks -- had forgotten about that one. | > | > Would you mind cooking up a quick unit test for this as a reminder? | > | > Dirk | | Done. Added the exemple verbatim. Feel free to add more tests.
Thanks and may do -- planning to write an Rcpp Gallery post on this as it needs more exposure. Dirk -- Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com _______________________________________________ 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