get_edge_tbl: Get a table with node and edge info

View source: R/get_edge_tbl.R

get_edge_tblR Documentation

Get a table with node and edge info

Description

Returns a table containing the tree topology (parent-to-child node pairs; whether a node is a tip or internal), edge (branch) lengths and timing of nodes (branching times).

Usage

get_edge_tbl(phylo)

Arguments

phylo

an object of the class phylo as introduced in ape. The phylogeny must start with the crown node (not stem), and be binary (no hard polytomies).

Value

a tibble with one observation per branch and five variables:

  • parent_node ID of the parent node

  • child_node ID of the child node

  • is_tip logical, is the (child) node a tip (TRUE) of the tree or an internal node (FALSE)

  • edge_length numeric length of the edge between parent and child, i.e. the branch length

  • time for timetrees, the time of the node relative to present (taken as the latest tip(s) in the tree)

Author(s)

Théo Pannetier


TheoPannetier/comrad documentation built on April 8, 2023, 8:06 a.m.