as.hierarchy: Hierarchy Structure

Description Usage Arguments Details Examples

Description

Stores variable indexes of clustering hierarchies in a fast accessible manner.

Usage

1
as.hierarchy(x, max.height, height, names, ...)

Arguments

x

A S3 object e.g. from hclust or dendrogram.

max.height

Is the maximal height below the height of the global node which is considered.

height

A vector of heights at which nodes are grouped.

names

Variable names in the order in which the indexes should be assigned to the variables.

...

Further arguments.

Details

For the HIT algorithm it is important to have the hierarchical clustering structure in a fast accessible format. This is provided by the hierarchy object generated with this function.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
##
set.seed(123)
n <- 80
p <- 90
# x with correlated columns
corMat <- toeplitz((p:1/p)^3)
corMatQ <- chol(corMat)
x <- matrix(rnorm(n * p), nrow = n) %*% corMatQ
colnames(x) <- paste0("x", 1:p)
# hierarchy
hc <- hclust(dist(t(x)))
hier <- as.hierarchy(hc)

QTCAT/hit documentation built on May 8, 2019, 3:48 a.m.