Learn R Programming

rrnni (version 0.1.1)

read_newick: Read a newick tree

Description

Read a tree in a newick format and convert it to a rankedPhylo

Usage

read_newick(x)

Value

object of class "rankedPhylo"

Arguments

x

a single character string containing tree in a newick format

Examples

Run this code
read_newick("((A:1,B:1):1,C:2);")

# Note, not all valid newick trees are valid ranked trees
try( read_newick("((A,B),C);") ) 

Run the code above in your browser using DataLab