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
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
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