prune_Cophylo: Pruning a cophylogeny

prune_cophyloR Documentation

Pruning a cophylogeny

Description

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.

Usage

prune_cophylo(cophy)

Arguments

cophy

an object of class cophylogeny that contains a host tree with one associated parasite tree.

Examples

coph <- rcophylo(tmax=5)
cophPruned <- prune_cophylo(coph)
plot(phytools::cophylo(cophPruned$prunedHtree, cophPruned$prunedPtree, cophPruned$tipAssociations))

JanEngelstaedter/cophy documentation built on Nov. 7, 2023, 9:37 a.m.