[R] How to create a dendrogram with colored branches
beginner
paxkn at nottingham.ac.uk
Sat Aug 3 17:47:41 CEST 2013
Hi
I would like to create a dendrogram in R which has colored branches, like
the one shown below.
<http://r.789695.n4.nabble.com/file/n4672993/dendrogram.png>
So far I used following commands to create a standard dendrogram:
d <- dist(as.matrix(data[,29])) # find distance matrix
hc <- hclust(d) # apply hirarchical clustering
plot(hc,labels=data[,1], main="", xlab="") # plot the dendrogram
How should I modify this code to obtain a desired result ?
Thanks in advance for your help.
--
View this message in context: http://r.789695.n4.nabble.com/How-to-create-a-dendrogram-with-colored-branches-tp4672993.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list