File: test_plottingDeepDendrogram.R

package info (click to toggle)
gplots 3.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,580 kB
  • sloc: makefile: 2
file content (19 lines) | stat: -rw-r--r-- 558 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
suppressMessages(library(gplots))

dat <- as.matrix(read.csv(file="dat.csv", row.names=1))
dist2 <- function(x) as.dist(1-cor(t(x), method="pearson"))
hclust1 <- function(x) hclust(x, method = "single")

distance <- dist2(dat)
cluster  <- hclust1(distance)

dend <- as.dendrogram(cluster)

## R's default recursion limits will be exceeded when plotting this dendrogram
try( gplots:::plot.dendrogram(dend) )
try( heatmap.2(dat, Rowv=dend) )

## Increase them and try again
options("expressions"=20000)
gplots:::plot.dendrogram(dend)
heatmap.2(dat, Rowv=dend)