Learn R Programming

MorphSim (version 0.1.0)

find_path_to_tip: Determines the route (nodes and branches) for a tip in a phylogenetic tree

Description

Traverses the tree to determine the evolutionary path (branches) from root to a given tip.

Usage

find_path_to_tip(tree, tip)

Value

A matrix with columns parent and child representing the path

Arguments

tree

A phylogenetic tree of class phylo

tip

Tip label (character)

Examples

Run this code
phy <- ape::rtree(10)
route_n <- find_path_to_tip(phy, "t2")

Run the code above in your browser using DataLab