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

Tal Galili tal.galili at gmail.com
Sat Jul 27 13:06:23 CEST 2013

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 plan of finding the functions I'll
need and write them in Rcpp.
The most basic example of such a function is for getting and setting the
labels of a dendrogram.
labels.dendrogram is in base R, and I already have the function:
In: https://github.com/talgalili/dendextend/blob/master/R/labels.r
But these are SLOW functions.
So my hope is to write them in Rcpp - them, and some other functions I'm
playing with. Since ALL of these functions have the basic same structure,
so once I'll have one nailed down, the rest will be easy.

If you or anyone else wishes to help write that first function, that would
be great. Otherwise, I'll probably get to it once I finish uploading,
tidying, and documenting all of my other functions (I have quite a bunch of
them in the pipeline, before I'll get to optimizing them through Rcpp).

Thank you (and the rest) for the answers, I am learning a lot,

On Sat, Jul 27, 2013 at 1:52 PM, Romain Francois
<romain at r-enthusiasts.com>wrote:

> C++ function that would start by creating a clone of your list, using
> clone<List>.
> - from this call a C++ function to recurse.
> - for the actua

Contact me: Tal.Galili at gmail.com |
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com (English)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20130727/417e8f63/attachment.html>

More information about the Rcpp-devel mailing list