# Create a simple four-taxon tree:
tree <- ape::read.tree(text = "(A,(B,(C,D)));")
# Plot the tree:
ape::plot.phylo(tree)
# Add nodelabels and show that the most recent common
# ancestor of B, C, and D is node 6:
ape::nodelabels()
# Use find_mrca to show that the most recent common
# ancestor of B, C, and D is node 6:
find_mrca(
descendant_names = c("B", "C", "D"),
tree = tree
)
Run the code above in your browser using DataLab