Learn R Programming

shipunov (version 1.0)

Hclust.match: Counts matches between two hierarchical clusterings

Description

Counts matches between two hierarchical clusterings

Usage

Hclust.match(hc1, hc2, scale=FALSE)

Arguments

hc1

First hclust object

hc2

Second hclust object

scale

Scale by the sum size of trees?

Details

'Hclust.match()' counts matches between two hierarchical clusterings (based on 'cutree()').

Result is a sort of consensus distances. Useful, for example, for clustering heatmaps.

Examples

Run this code
# NOT RUN {
aa <- read.table("http://ashipunov.info/data/atmospheres.txt", h=TRUE, sep="\t", row.names=1)
aa.d1 <- hclust(dist(t(aa)))
aa.d2 <- hclust(as.dist(1 - abs(cor(aa, method="s"))), method="ward.D")
aa12.match <- Hclust.match(aa.d1, aa.d2)
heatmap(aa12.match, scale="none")
# }

Run the code above in your browser using DataLab