
Compute the Abouheif distance matrix
abouheif.Rd
The Abouheif distance is the product of the number of direct descendants of each node in the path between two nodes. It is a measure of the number of transmission events between two nodes.
Examples
tree <- data.frame(from = c(1, 1, 2, 2, 3, 3), to = c(2, 3, 4, 5, 6, 7))
abouheif(tree)
#> 1 2 3 4 5 6 7
#> 1 0 0 0 3 3 3 3
#> 2 0 0 2 0 0 6 6
#> 3 0 2 0 6 6 0 0
#> 4 3 0 6 0 3 18 18
#> 5 3 0 6 3 0 18 18
#> 6 3 6 0 18 18 0 3
#> 7 3 6 0 18 18 3 0