[R] A question regarding "cutree"

Jun Ding dingjun_cn at yahoo.com
Thu Feb 22 22:57:42 CET 2007


Hi Everyone, 

I am doing hierarchical clustering analysis and have a
question regarding "cutree". 

I am doing things like this:

hc <- hclust(dist(X))
a <- cutree(hc, k=2)

Basically "a" is a vector containing the assignments
of 1 or 2 for each sample. May I know how "cutree"
decides to assign 1 and 2's to each sample (in other
words, how clusters 1 and 2 are decided)? I am having
the feeling that Sample 1 will be always assigned to
Cluster 1, but I am not sure about this. 

Thank you!

Best,
Jun



More information about the R-help mailing list