library("TreeTools")
# Treating the two edges to the root node as distinct
PathDist(BalancedTree(7), PectinateTree(7))
# Counting those two edges once
PathDist(UnrootTree(BalancedTree(7)), UnrootTree(PectinateTree(7)))
PathDist(BalancedTree(7), as.phylo(0:2, 7))
PathDist(as.phylo(0:2, 7), PectinateTree(7))
PathDist(list(bal = BalancedTree(7), pec = PectinateTree(7)),
as.phylo(0:2, 7))
CompareAll(as.phylo(30:33, 8), PathDist)
Run the code above in your browser using DataLab