# Correlation distance function.
cordist <- function(x ) {
return( as.dist(( 1 - cor(t(x), use = "pairwise.complete.obs"))))
}
# Getting nice aligned clustering trees. Assume given my.dists.
clus<-hclust(my.dists,method = "a")
# Plot heatmap
#heatmap(x, Rowv=as.dendrogram(hclust(cordist(x))))
heatmap(x, Rowv=as.dendrogram(clus))
No comments:
Post a Comment