Hi boyang zhe,

The dendrogram is stored in the object returned from heatmap.2

#e.g.

 x <- heatmap.2(matrix(1:9,3))

dend.row <- x$rowDendrogram
class(dend.row)
[1] "dendrogram"

plot(tmp$rowDendrogram)



Amos Folarin



---------- Forwarded message ----------
From: boyang zhe <zheboy...@gmail.com>
To: r-help@r-project.org
Date: Mon, 11 Apr 2011 11:15:52 +0200
Subject: [R] heatmap clustering dendrogram export
Hi,

I am a beginner for R.

I had use gplots to generate a heatmap as following:

>heatmap.2(matrix, col=topo.colors(75), dendrogram="column", Rowv=FALSE,
trace="none", key=TRUE, keysize=0.8, density.info="none", cexRow=0.2,
cexCol=0.6)

It work well. It generate heatmap whith rcolumn clustering dendrogram and I
can export a very nice graph. But I don not know how to export the column
clustering dendrogram out. Because I want to get the dendrogram for next
step analysis. If I can export it as the newick format (or nexus format), it
will be much easy for me.

Thank you very much!

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to