NJTree()
generates a rooted neighbour joining tree from a phylogenetic
dataset.
NJTree(dataset, edgeLengths = FALSE, ratio = TRUE, ambig = "mean")
A phylogenetic data matrix of phangorn class phyDat
,
whose names correspond to the labels of any accompanying tree.
Logical specifying whether to include edge lengths.
Settings of ambig
and ratio
to be used when
computing Hamming()
distances between sequences.
NJTree
returns an object of class phylo
.
Other tree generation functions:
ConstrainedNJ()
,
GenerateTree
,
TreeNumber
,
TrivialTree
data("Lobo")
NJTree(Lobo.phy)
#>
#> Phylogenetic tree with 48 tips and 47 internal nodes.
#>
#> Tip labels:
#> Tubiluchus_Priapulida, Cricocosmia, Aysheaia, Siberion, Onychodictyon_ferox, Onychodictyon_gracilis, ...
#>
#> Rooted; no branch lengths.