Learn R Programming

phytools (version 0.3-72.1)

read.newick: Robust Newick style tree reader

Description

This function reads a Newick style tree from file.

Usage

read.newick(file="", text)

Arguments

file
name of text file with single Newick style tree or multiple trees, one per line.
text
character string containing tree.

Value

Details

This function is almost completely redundant with read.tree; however it is 'robust' in that it does not fail if the tree contains so-called 'singles' (nodes with only one descendant).

See Also

read.tree, read.nexus

Examples

Run this code
tree<-"((Human,Chimp),Gorilla),Monkey);"
phy<-read.newick(text=tree)

Run the code above in your browser using DataLab