<div dir="ltr">Hi Hadley,<div><br></div><div>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.</div>
<div>Since the example I gave in the first e-mail doesn't work (help is welcomed), I am not there yet :)Â </div><div><br></div><div>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 <a href="https://github.com/talgalili/dendextend">dendextend </a>is to create various functions that will work for non-binary trees (which I previously had to work with).</div>
<div><br></div><div>Tal</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra">
<br clear="all"><div><div dir="ltr"><br>----------------Contact Details:-------------------------------------------------------<br>Contact me: <a href="mailto:Tal.Galili@gmail.com" target="_blank">Tal.Galili@gmail.com</a> |Â <br>
Read me: <a href="http://www.talgalili.com" target="_blank">www.talgalili.com</a> (Hebrew) | <a href="http://www.biostatistics.co.il" target="_blank">www.biostatistics.co.il</a> (Hebrew) | <a href="http://www.r-statistics.com" target="_blank">www.r-statistics.com</a> (English)<br>
----------------------------------------------------------------------------------------------<br><br></div></div>
<br><br><div class="gmail_quote">On Fri, Jul 26, 2013 at 7:07 PM, Hadley Wickham <span dir="ltr"><<a href="mailto:h.wickham@gmail.com" target="_blank">h.wickham@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">> I understand your point, and am not sure how to proceed without it.<br>
<br>
</div>Just make sure you clone the initial list once, or use another C++<br>
data structure (e.g. std::vector) that can grow efficiently.<br>
<br>
Alternatively, you could create your own alternative to as.dendrogram<br>
that doesn't create a hierarchical structure. Â (That's what I'd try<br>
first)<br>
<div class="HOEnZb"><div class="h5"><br>
Hadley<br>
<br>
--<br>
Chief Scientist, RStudio<br>
<a href="http://had.co.nz/" target="_blank">http://had.co.nz/</a><br>
</div></div></blockquote></div><br></div>