patristic {mixtree} | R Documentation |
Compute the Patristic distance matrix
Description
The patristic distance is the number of generations separating any two nodes in a transmission tree.
Usage
patristic(tree)
Arguments
tree |
A data frame representing a transmission tree, with the first column containing the infector IDs and the second the infectee IDs. |
Value
A square, symmetric matrix of patristic distances between nodes.
Examples
tree <- data.frame(from = c(1, 1, 2, 2, 3, 3), to = c(2, 3, 4, 5, 6, 7))
patristic(tree)
[Package mixtree version 0.0.1 Index]