[R] Extract variance from dist(cluster.data)
Philip Silva
p.silva at gmx.de
Thu Dec 17 10:00:37 CET 2009
Hi!
I am currently clustering data that is read out of a csv file. The code is:
file <- read.table("/tmp/cluster_input.tmp")
cluster.data <- as.matrix(file[,2:39040])
cluster.dist <- dist(cluster.data)
cluster.hclust <- hclust(cluster.dist)
cluster.hcut <- cutree(cluster.hclust,10) # 10 == number of clusters!
write.table(cluster.hcut, "/tmp/cluster_result.csv")
Now I would like to know the Variance of each cluster in hcut. Is it correct that the variances are already encoded in dist(cluster.data)? How can I get it?
Thanks a lot in advance.
Best regards
Philip Silva
--
Preisknaller: GMX DSL Flatrate für nur 16,99 Euro/mtl.!
http://portal.gmx.net/de/go/dsl02
More information about the R-help
mailing list