Most Recent Common Ancestor

Description

Computes the most recent common ancestor node for a pair of nodes of a tree.

Usage

1
  mrca(x, y, tree)

Arguments

x

a node of the tree.

y

a node of the tree.

tree

a tree in matrix format.

Value

the most recent common ancestor node of x and y.

Examples

1
2
  data(kidney)
  mrca(1,2, kidney$res$tree)