Learn R Programming

data.tree (version 1.1.0)

ToNewick: Write a data.tree structure to Newick notation

Description

To read from Newick, you can use the ape package, and convert the resulting phylo object to a data.tree structure.

Usage

ToNewick(node, heightAttribute = DefaultPlotHeight, ...)

Arguments

node

The root Node of a tree or sub-tree to be converted

heightAttribute

The attribute (field name, method, or function) storing or calculating the height for each Node

...

parameters that will be passed on the the heightAttributeName, in case it is a function

See Also

Other Conversions from Node: as.dendrogram.Node()

Examples

Run this code
data(acme)
ToNewick(acme)
ToNewick(acme, heightAttribute = NULL)
ToNewick(acme, heightAttribute = function(x) DefaultPlotHeight(x, 200))
ToNewick(acme, rootHeight = 200)

Run the code above in your browser using DataLab