# 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
Run the code above in your browser using DataLab