NJTree() generates a rooted neighbour joining tree from a phylogenetic dataset.

NJTree(dataset, edgeLengths = FALSE, ratio = TRUE, ambig = "mean")

Arguments

dataset

A phylogenetic data matrix of phangorn class phyDat, whose names correspond to the labels of any accompanying tree.

edgeLengths

Logical specifying whether to include edge lengths.

ambig, ratio

Settings of ambig and ratio to be used when computing Hamming() distances between sequences.

Value

NJTree returns an object of class phylo.

See also

Other tree generation functions: ConstrainedNJ(), GenerateTree, SingleTaxonTree(), TreeNumber

Author

Martin R. Smith (martin.smith@durham.ac.uk)

Examples

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.