tree.get.tag: Retrieves a named tag from the given node. Tags are usually...

Description Usage Arguments Value Examples

Description

Retrieves a named tag from the given node. Tags are usually loaded via NHX annotations when reading a tree file or string (see tree.read) or by loading data from an external data frame (see tree.load.tags).

Usage

1
  tree.get.tag(phylo, node, tag)

Arguments

phylo

input phylo object

node

the node index from which to retrieve the tag

tag

the name of the tag to retrieve

Value

character string corresponding to the tag value, if exists; NA otherwise.

Examples

1
2
tree <- tree.read('((a,b[&&NHX:foo=bar]),c);')
tree.get.tag(tree, tree.node.with.label(tree, 'b'), 'foo') # gives "bar"

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