Constructs an approximation to a neighbour-joining tree, modified in order to be consistent with a constraint. Zero-length branches are collapsed at random.
ConstrainedNJ(dataset, constraint, weight = 1L, ratio = TRUE, ambig = "mean")
A phylogenetic data matrix of phangorn class
whose names correspond to the labels of any accompanying tree.
Either an object of class
phyDat, in which case returned
trees will be perfectly compatible with each character in
or a tree of class
phylo, in which each node in
constraint will occur in
the returned tree.
for further examples.
Numeric specifying degree to up-weight characters in
ratio to be used when
Hamming() distances between sequences.
ConstrainedNJ() returns a tree of class