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

Tal Galili tal.galili at gmail.com
Fri Jul 26 22:58:42 CEST 2013


Hi Hadley,

Regarding the cloning of the object in C++: since I will want to use the
function recursively, I will either have the cloning in the wrapper R
function. And if I discover that is not possible (I haven't tried it yet),
my next thought was to split the work into two functions, in one there will
be the cloning, and the other will do the recursion.
Since the example I gave in the first e-mail doesn't work (help is
welcomed), I am not there yet :)

As for as.dendrogram, that is the case with hclust object. However, these
objects has limitations when it comes to trees which are NOT binary trees.
So one of the things I started doing with dendextend
<https://github.com/talgalili/dendextend>is to create various functions
that will work for non-binary trees (which I previously had to work with).

Tal














----------------Contact
Details:-------------------------------------------------------
Contact me: Tal.Galili at gmail.com |
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com (English)
----------------------------------------------------------------------------------------------



On Fri, Jul 26, 2013 at 7:07 PM, Hadley Wickham <h.wickham at gmail.com> wrote:

> > I understand your point, and am not sure how to proceed without it.
>
> Just make sure you clone the initial list once, or use another C++
> data structure (e.g. std::vector) that can grow efficiently.
>
> Alternatively, you could create your own alternative to as.dendrogram
> that doesn't create a hierarchical structure.  (That's what I'd try
> first)
>
> Hadley
>
> --
> Chief Scientist, RStudio
> http://had.co.nz/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20130726/d39b52ce/attachment.html>


More information about the Rcpp-devel mailing list