optimTree.dendrogram {compdiagTools}R Documentation

Change an hclust to a dendrogram object while keeping the given ordering

Description

Function as.dendrogram reorders the hclust object, optimTree.dendrogram does not. The function uses reorder and computes suitable weights.

Usage

optimTree.dendrogram(hclust.obj)

Arguments

hclust.obj An hclust object.

Value

Returns a dendrogram object.

Author(s)

Stefanie Scheid <stefanie.scheid@molgen.mpg.de>

See Also

optimTree.plot,optimTree

Examples

a <- rbind(rep(0,4),
           c(1,rep(0,3)),
           c(5,2,0,0),
           c(3,9,7,0))

a <- as.dist(a)

hc.old <- hclust(a,method="average")
hc.new <- optimTree(hc.old,a)

plot(hc.new)
plot(as.dendrogram(hc.new))
plot(optimTree.dendrogram(hc.new))

[Package compdiagTools version 1.5.3 Index]