[R] cuttree

Ales Ziberna ales.ziberna at guest.arnes.si
Thu Feb 10 08:25:03 CET 2005


I am not sure if I understad you correctly. Are you inrested in getting a 
list of units that belond to each group? Then do:

branches<-cutree(hc,k=2)

group1<-which(branches==1)
group2<-which(branches==2)

Hope this helps!
Ales Ziberna

----- Original Message ----- 
From: "T. Murlidharan Nair" <nair at sdsc.edu>
To: <r-help at stat.math.ethz.ch>
Sent: Thursday, February 10, 2005 1:35 AM
Subject: [R] cuttree


> How do I get the labels from a hclust object after I have cut
> the tree using cutree ?
> hc<-hclust(someData,"a")
>
> branches<-cutree(hc)
>
> If there are two branches, how do I obtain the labels associated with each 
> of the branches separately ?
> Thanks../Murli
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
>
>




More information about the R-help mailing list