Re: [Rcpp-devel] Dynamic Wrapping and Recursion with Rcpp - using an R function?

2013-07-27 Thread Romain Francois
Le 27/07/13 13:06, Tal Galili a écrit : Hi Romain, Originally I hoped to be able to "get around" writing various functions in C++, by having Rcpp wrap an R function. But after Krzysztof explanation, and yours, I realized it would not offer any gain (due to the copying of objects all around). In

Re: [Rcpp-devel] Dynamic Wrapping and Recursion with Rcpp - using an R function?

2013-07-27 Thread Tal Galili
Hi Romain, Originally I hoped to be able to "get around" writing various functions in C++, by having Rcpp wrap an R function. But after Krzysztof explanation, and yours, I realized it would not offer any gain (due to the copying of objects all around). In which case, I am back to the original pla

Re: [Rcpp-devel] Dynamic Wrapping and Recursion with Rcpp - using an R function?

2013-07-27 Thread Romain Francois
A bit of warning from a different angle. Do you really want to be able to pass any arbitrary R function to your dendrapply ? You just can't expect R functions to work "in place". e.g. your function fu: fu <- function(node) { attr(node, "height") = attr(node, "height")+1 } Does not modify