Learn R Programming

TreeTools (version 1.12.0)

NJTree: Generate a neighbour joining tree

Description

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

Usage

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

Value

NJTree returns an object of class phylo.

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.

See Also

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

Examples

Run this code
data("Lobo")
NJTree(Lobo.phy)

Run the code above in your browser using DataLab