Generates a starting tree by adding each taxon in turn to the most parsimonious location.
AdditionTree(dataset, concavity = Inf, constraint, sequence)
AdditionTree()
returns a tree of class phylo
, rooted on
sequence[1]
.
A phylogenetic data matrix of phangorn class
phyDat
, whose names correspond to the labels of any accompanying tree.
Perhaps load into R using ReadAsPhyDat
.
Additive (ordered) characters can be handled using
Decompose
.
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,
(which underperforms step weighting approaches
Goloboff2008,Goloboff2018,Goloboff2019,Smith2019TreeSearch).
Specify "profile"
to employ an approximation of profile parsimony
Faith2001TreeSearch.
Either an object of class phyDat
, in which case
returned trees will be perfectly compatible with each character in
constraint
; or a tree of class phylo
, all of whose nodes will occur
in any output tree.
See ImposeConstraint()
and
vignette
for further examples.
Character or numeric vector listing sequence in which to add taxa. Randomized if not provided.
Impose a constraint: TreeTools::ImposeConstraint()
Neighbour-joining trees: TreeTools::NJTree()
;
TreeTools::ConstrainedNJ()
Other tree generation functions:
RandomMorphyTree()
data("inapplicable.phyData", package = "TreeSearch")
AdditionTree(inapplicable.phyData[["Longrich2010"]], concavity = 10)
Run the code above in your browser using DataLab