list_offspring: List each nodes' offspring or parent

View source: R/list_offspring.R

list_offspringR Documentation

List each nodes' offspring or parent

Description

For each node in a tree, the functions list_offspring and list_parents lists all its offspring and parents, respectively.

Usage

list_offspring(x)

list_parents(x)

Arguments

x

An object of class phylo or aphylo.

Value

List of length n (total number of nodes).

Examples

# A simple example with phylo tree ------------------------------------------

set.seed(4)
x <- ape::rtree(10)
list_offspring(x)


USCbiostats/phylogenetic documentation built on Oct. 28, 2023, 7:23 a.m.