hclust_fca: Find first common ancestor of 2 nodes in an hclust object

Description Usage Arguments Value Author(s) Examples

Description

Find first common ancestor of 2 nodes in an hclust object

Usage

1
hclust_fca(hc, a, b)

Arguments

hc

an hclust object

a

an integer vector with the first leaf node

b

an integer vector with the second leaf node (same length as a)

Value

an integer vector of the same length as a and b identifing the first common ancestors of a and b

Author(s)

Julien Prados

Examples

1
2
3
4
5
6
  hc <- hclust(dist(USArrests), "complete")
  plot(hc)
  A <- outer(seq_along(hc$order),seq_along(hc$order),hclust_fca,hc=hc)
  H <- array(hc$height[A],dim(A))
  image(H[hc$order,hc$order])
  image(A[hc$order,hc$order])

bmrm documentation built on May 2, 2019, 2:49 p.m.