Skip to contents

Get node numbers, node names, descendant tip numbers and labels of nodes from any tree, and node ages from dated trees.

Usage

tree_get_node_data(
  tree = NULL,
  nodes = NULL,
  node_data = c("node_number", "node_label", "node_age", "descendant_tips_number",
    "descendant_tips_label")
)

Arguments

tree

A tree either as a newick character string or as a phylo object.

nodes

Numeric vector with node numbers from which you want to obtain data. Default to NULL: obtain data for all nodes in the tree.

node_data

A character vector containing one or all from: "node_number", "node_label", "node_age", "descendant_tips_number", "descendant_tips_label"

Value

A list