powered by
The patristic distance is the number of generations separating any two nodes in a transmission tree.
patristic(tree)
A square, symmetric matrix of patristic distances between nodes.
A data frame representing a transmission tree, with the first column containing the infector IDs and the second the infectee IDs.
tree <- data.frame(from = c(1, 1, 2, 2, 3, 3), to = c(2, 3, 4, 5, 6, 7)) patristic(tree)
Run the code above in your browser using DataLab