tree.read: 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.
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
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)