[R] Advice on exploration of sub-clusters in hierarchical dendrogram

R. Michael Weylandt <michael.weylandt@gmail.com> michael.weylandt at gmail.com
Fri Feb 24 04:23:42 CET 2012


On Feb 23, 2012, at 6:20 PM, kosmo7 <dnicolgr at hotmail.com> wrote:

> Dear Elai,
> thank you very much for your suggestion. I tried cutting the dendrogram
> instead of the hclust tree with:
> clusters<-cut(x, h=1.6)
> but then when I try to call/plot cluster 1 for example, with:
> plot(clusters$lower[[1]])
> I get only 2 members that are joined together at distance=0  (cluster 1 for
> instance, consists of several hundred of members).
> So it looks like / plot(clusters$lower[[1]])/ only calls the very first node
> of the tree and not the content of the respective cluster [[1]] at the
> defined cutoff=1.6. Maybe /cut/ instead of /cutree/ doesnt do the work? Or 
> maybe I am just doing something  wrong?...
> In another post I read that with /df[value %in% v, ] / I can extract
> specific subsets of a data frame/table. 

That was me and there's a slight mistake in that post (corrected by Sarah): should be

df[df$value %in% v, ]

Sorry for any confusion that might have caused 

> Maybe I could use this to extract
> only the distances of members of a specific cluster as defined by cutree
> from the initial distance matrix? But still, I am afraid I don't get what I
> should use as /value/ and /v/....
> --
> View this message in context: http://r.789695.n4.nabble.com/Advice-on-exploration-of-sub-clusters-in-hierarchical-dendrogram-tp4414277p4415589.html
> Sent from the R help mailing list archive at Nabble.com.
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list