prune_cophylo | R Documentation |
This function prunes a cophylogeny object to include only extant species. The function returns the two trees and the associations of the tips of the parasite tree with the host tree. This can then be used to plot a tanglegram, as shown in the example.
prune_cophylo(cophy)
cophy |
an object of class cophylogeny that contains a host tree with one associated parasite tree. |
coph <- rcophylo(tmax=5)
cophPruned <- prune_cophylo(coph)
plot(phytools::cophylo(cophPruned$prunedHtree, cophPruned$prunedPtree, cophPruned$tipAssociations))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.