match_tree_edges {Claddis} | R Documentation |
Edge matching function
Description
Given two trees where one is a pruned version of the other gives matching edges and nodes of pruned tree to original tree.
Usage
match_tree_edges(original_tree, pruned_tree)
Arguments
original_tree |
A tree in phylo format. |
pruned_tree |
A tree in phylo format that represents a pruned version of |
Details
Finds matching edge(s) and node(s) for a pruned tree in the original tree from which it was created. This is intended as an internal function, but may be of use to someone.
Value
matching_edges |
A list of the matching edges. |
matching_nodes |
A matrix of matching node numbers. |
removed_edges |
A vector of the removed edges. |
Author(s)
Graeme T. Lloyd graemetlloyd@gmail.com
Examples
# Create a random 10-taxon tree:
original_tree <- ape::rtree(n = 10)
# Remove three leaves:
pruned_tree <- ape::drop.tip(phy = original_tree, tip = c("t1", "t3", "t8"))
# Find matching edges:
X <- match_tree_edges(original_tree, pruned_tree)
# Show matching edges:
X$matching_edges
# Show matching nodes:
X$matching_nodes
# Show removed edges:
X$removed_edges
[Package Claddis version 0.6.3 Index]