powered by
For each node in a tree, the functions list_offspring and list_parents lists all its offspring and parents, respectively.
list_offspring
list_parents
list_offspring(x)list_parents(x)
list_parents(x)
List of length n (total number of nodes).
n
An object of class phylo or aphylo.
phylo
aphylo
# A simple example with phylo tree ------------------------------------------ set.seed(4) x <- ape::rtree(10) list_offspring(x)
Run the code above in your browser using DataLab