Learn R Programming

mixtree (version 0.0.1)

abouheif: Compute the Abouheif distance matrix

Description

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.

Usage

abouheif(tree)

Value

A square, symmetric matrix of Abouheif distances between nodes.

Arguments

tree

A data frame representing a transmission tree, with the first column containing the infector IDs and the second the infectee IDs.

Examples

Run this code
tree <- data.frame(from = c(1, 1, 2, 2, 3, 3), to = c(2, 3, 4, 5, 6, 7))
abouheif(tree)

Run the code above in your browser using DataLab