tree.read.nhx: Reads a tree annotated with NHX-formatted annotations. A...

Description Usage Arguments Value Examples

Description

Reads a tree annotated with NHX-formatted annotations. A phylo object is returned, with annotations stored as tag-value lists. Several convenience functions are provided for accessing these annotations; see 'See Also' below.

Usage

1
  tree.read.nhx(str, coming.from.tree.read = F)

Arguments

str,

a string containing the NHX-formatted tree

coming.from.tree.read,

a boolean indicating whether this function is being called from within the tree.read function. Since this function may call tree.read if no NHX annotations are detected, this is required to avoid an infinite loop.

Value

phylo object containing the tree and associated annotations.

Examples

1
2
3
4
str <- '((a,b[&&NHX:foo=bar]),c);'
x <- tree.read.nhx(str)
print(tree.get.tags(x, tree.find(x, 'b')))
print(as.character(x))

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