[R] apply kmeans into every level of the tree..

jiliguala jiliguala at mail.com
Sun Jun 19 15:23:05 CEST 2011


hi, r users 

I'm a new r user. i want to apply kmeans into every level of the tree which
i built.

the codes for clusterring only one level of the tree.

#####
d  <- dist(data1, method = "euclidean")

h1 <- hclust(d, method="ward")  

c1 <- cutree(h1, 100)  # 100 groups which i want to cluster

cdg <- aggregate(data1, list(c1),mean)[,2:(nd+1)]     ## nd is the
attributes i have
3
k1 <- kmeans(daata1, centers=cdg)
######

now i want to cluster every level of the tree in order to search it.

any thought about that, thanks for helping.

--
View this message in context: http://r.789695.n4.nabble.com/apply-kmeans-into-every-level-of-the-tree-tp3609250p3609250.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list