tree_get_node_data: Get node numbers, node names, descendant tip numbers and...

View source: R/tree_processing.R

tree_get_node_dataR Documentation

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

Description

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


phylotastic/datelife documentation built on Jan. 17, 2024, 11:10 p.m.