
Last chance! 50% off unlimited learning
Sale ends in
TreeLength()
uses the Morphy library Brazeau2017TreeSearch
to calculate a parsimony score for a tree, handling inapplicable data
according to the algorithm of Brazeau2019;textualTreeSearch.
Trees may be scored using equal weights, implied weights
Goloboff1993TreeSearch, or profile parsimony
Faith2001TreeSearch.
IWScore(tree, dataset, concavity = 10L, ...)TreeLength(tree, dataset, concavity = Inf)
# S3 method for phylo
TreeLength(tree, dataset, concavity = Inf)
# S3 method for numeric
TreeLength(tree, dataset, concavity = Inf)
# S3 method for list
TreeLength(tree, dataset, concavity = Inf)
# S3 method for multiPhylo
TreeLength(tree, dataset, concavity = Inf)
Fitch(tree, dataset)
TreeLength()
returns a numeric vector containing the score for
each tree in tree
.
A tree of class phylo
, a list thereof (optionally of class
multiPhylo
), or an integer -- in which case tree
random trees will be
uniformly sampled.
A phylogenetic data matrix of phangorn class
phyDat
, whose names correspond to the labels of any accompanying tree.
Determines the degree to which extra steps beyond the first
are penalized. Specify a numeric value to use implied weighting
Goloboff1993TreeSearch; concavity
specifies k in
k / e + k. A value of 10 is recommended;
TNT sets a default of 3, but this is too low in some circumstances
Goloboff2018,Smith2019TreeSearch.
Better still explore the sensitivity of results under a range of
concavity values, e.g. k = 2 ^ (1:7)
.
Specify Inf
to weight each additional step equally.
Specify "profile"
to employ profile parsimony Faith2001TreeSearch.
unused; allows additional parameters specified within ... to be received by the function without throwing an error.
Martin R. Smith (using Morphy C library, by Martin Brazeau)
Conduct tree search using MaximizeParsimony()
(command line),
EasyTrees()
(graphical user interface), or TreeSearch()
(custom optimality criteria).
See score for each character: CharacterLength()
.
Other tree scoring:
CharacterLength()
,
LengthAdded()
,
MinimumLength()
,
MorphyTreeLength()
,
TaxonInfluence()
data("inapplicable.datasets")
tree <- TreeTools::BalancedTree(inapplicable.phyData[[1]])
TreeLength(tree, inapplicable.phyData[[1]])
TreeLength(tree, inapplicable.phyData[[1]], concavity = 10)
TreeLength(tree, inapplicable.phyData[[1]], concavity = "profile")
TreeLength(5, inapplicable.phyData[[1]])
Run the code above in your browser using DataLab