TreeDist (version 1.1.1)

PathDist: Path distance

Description

Calculate the path distance between trees.

Usage

PathDist(tree1, tree2 = NULL)

Arguments

tree1, tree2

Trees of class phylo, with leaves labelled identically, or lists of such trees to undergo pairwise comparison.

Value

PathDist() returns a vector or distance matrix of distances between trees.

Details

This function is a wrapper for the function path.dist() in the phangorn package. It pre-processes trees to ensure that their internal representation does not cause the path.dist() function to crash R.

The path distance is also termed the cladistic difference or topological distance.

Use of the path distance is discouraged as it emphasizes shallow relationships at the expense of deeper (and arguably more fundamental) relationships (Farris, 1973).

References

Farris1973TreeDist

See Also

Other tree distances: JaccardRobinsonFoulds(), KendallColijn(), MASTSize(), MatchingSplitDistance(), NNIDist(), NyeSimilarity(), Robinson-Foulds, SPRDist(), TreeDistance()

Examples

Run this code
# NOT RUN {
library('TreeTools')

PathDist(BalancedTree(7), 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