Hello Martin,

Thank you for the reference to the "cut" option in the dendrogram help page!
 I guess I was too focused on looking for a solution to the hclust object
then to think that such a method existed for dendrograms.

The cut.dendrogram  doesn't solve my problem yet, since what I'm looking for
is the output of something like:
cutree(hc.object, k = 3)
Which is a vector indicating to which cluster belongs each item.

And for some reason I can't seem to understand the structure of the
dendrogram object using "str".
But I'll read some more and write back if I can't solve it.

p.s: If I'll succeed in writing something useful, it will be
my pleasure and honor to contribute it back to the r-project :)

With regards,
Tal


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




On Wed, Dec 29, 2010 at 1:49 PM, Martin Maechler <maechler@stat.math.ethz.ch
> wrote:

> >>>>> Tal Galili <tal.galili@gmail.com>
> >>>>>     on Wed, 29 Dec 2010 13:32:26 +0200 writes:
>
>    > Hello Martin,
>    > Thank you for replying.
>
>    > I have two needs:
>
>    > 1) To merge two dendrograms into one.
>
>    > 2) To then run cutree on it (which works on hclust, but
>    >    not on dendrogram).
>
> Well, but cut() does and is prominently mentioned on the
> dendrogram help page (and its examples)
>
>    > I guess that if I knew how to perform both steps I would be able to do
> what
>    > I'm trying to do on my data.
>    > If nothing like this currently exists, I guess I'll simply implement a
>    > method of cutree for a dendrogram, and see how to merge two
> dendrograms
>    > together.
>
> so you only need to program the merge / join part.
>
> I did not take the time to understand what exactly you mean with
> that, but as there is no function to do that with "hclust" either,
> I'm convinced you should rather write one for "dendrogram"
> indeed; as merge() is already "S3 generic", I'd call it
>        merge.dendrogram()
>
> If you end up finding it useful and are willing to write a help
> page (including examples!) for it, you may consider donating it
> back to the R-project ... ;-)
>
> Regards, Martin
>
>

	[[alternative HTML version deleted]]

