Learn R Programming

TreeTools (version 1.12.0)

NewickTree: Write Newick Tree

Description

NewickTree() encodes a tree as a Newick-format string. This differs from write.tree() in the encoding of spaces as spaces, rather than underscores.

Usage

NewickTree(tree)

Value

NewickTree() returns a character string denoting tree in Newick format.

Arguments

tree

A tree of class phylo.

See Also

Use tip numbers, rather than leaf labels: as.Newick

Examples

Run this code
NewickTree(BalancedTree(LETTERS[4:9]))

Run the code above in your browser using DataLab