SPRDist | R Documentation |
SPRDist()
calculates an upper bound on the SPR distance between trees
using the heuristic method of \insertCitedeOliveira2008;textualTreeDist.
Other approximations are available
\insertCite@e.g. @Hickey2008, @Goloboff2008SPR, @Whidden2018TreeDist.
SPRDist(tree1, tree2 = NULL, method = "deOliveira", symmetric)
## S3 method for class 'phylo'
SPRDist(tree1, tree2 = NULL, method = "deOliveira", symmetric)
## S3 method for class 'list'
SPRDist(tree1, tree2 = NULL, method = "deOliveira", symmetric)
## S3 method for class 'multiPhylo'
SPRDist(tree1, tree2 = NULL, method = "deOliveira", symmetric)
tree1 , tree2 |
Trees of class |
method |
Character specifying which method to use to approximate the
SPR distance. Currently defaults to |
symmetric |
Ignored (redundant after fix of phangorn#97). |
SPRDist()
returns a vector or distance matrix of distances
between trees.
Martin R. Smith (martin.smith@durham.ac.uk)
Exact calculation with TBRDist
functions USPRDist()
and ReplugDist()
.
phangorn function SPR.dist()
employs
the \insertCitedeOliveira2008;textualTreeDist algorithm but can crash
when sent trees of certain formats, and tends to have a longer running time.
Other tree distances:
JaccardRobinsonFoulds()
,
KendallColijn()
,
MASTSize()
,
MatchingSplitDistance()
,
NNIDist()
,
NyeSimilarity()
,
PathDist()
,
Robinson-Foulds
,
TreeDistance()
library("TreeTools", quietly = TRUE)
# Compare single pair of trees
SPRDist(BalancedTree(7), PectinateTree(7))
# Compare all pairs of trees
SPRDist(as.phylo(30:33, 8))
# Compare each tree in one list with each tree in another
SPRDist(BalancedTree(7), as.phylo(0:2, 7))
SPRDist(as.phylo(0:2, 7), PectinateTree(7))
SPRDist(list(bal = BalancedTree(7), pec = PectinateTree(7)),
as.phylo(0:2, 7))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.