tree.read: Reads a tree and returns a phylo object. Note: this function...

Description Usage Arguments Value Examples

Description

Reads a tree and returns a phylo object. Note: this function was taken largely from the ape code base, but some alterations were made in order to support NHX formatted trees and to fix some bugs. Only files and strings with a single tree are allowed.

Usage

1
  tree.read(x, remove.whitespace = F)

Arguments

x,

string or filename containing the Newick- or NHX- formatted tree string, or a file containing such a string, to be read.

remove.whitespace

boolean, TRUE to remove whitespace from the tree, FALSE to retain whitespace. (defaults to FALSE)

Value

phylo object containing the tree (and associated annotations, if any)

Examples

1
2
3
str <- '((a,b),c)'
x <- tree.read(str)
print(as.character(x))

gjuggler/ggphylo documentation built on May 17, 2019, 6:05 a.m.