rphast (version 1.6.9)

summary.tree: Get a summary of a Newick-formatted tree, edge lengths, node names, etc

Description

Get a summary of a Newick-formatted tree, edge lengths, node names, etc

Usage

# S3 method for tree
summary(object, ...)

Arguments

object

A character string containing a newick tree

...

Not currently used (exists for S3 compatibility)

Value

A data frame with a row for every node, containing columns: branch length (tparent), distance to root (troot), name, label (if tree labels present), and parent, rchild, lchild.

Examples

Run this code
# NOT RUN {
tree <- "(((hg18:0.01, panTro2:0.01)hg18-panTro2:0.07,
              (mm9:0.083220,rn4:0.090564)mm9-rn4:
             0.269385)hg18-rn4:0.020666,canFam2:0.193569);"
summary.tree(tree)
summary.tree(label.subtree(tree, "mm9-rn4", "rodent", include.leading=TRUE))
# }

Run the code above in your browser using DataLab