Learn R Programming

phytools (version 2.1-1)

paste.tree: Paste two trees together

Description

Internal function for posterior.evolrate.

Usage

paste.tree(tr1, tr2)

Value

A tree.

Arguments

tr1

receptor tree.

tr2

donor clade.

Author

Liam Revell liam.revell@umb.edu

Details

Primarily designed as an internal function for posterior.evolrate; however, can be used to graft a clade onto a receptor tree at the "sticky tip" labeled with "NA".

The donor clade needs to have a root edge, even if it is zero length.

References

Revell, L. J. (2024) phytools 2.0: an updated R ecosystem for phylogenetic comparative methods (and other things). PeerJ, 12, e16505.

Examples

Run this code
tr1<-rtree(10)
tr2<-rtree(10)
tr1$tip.label[1]<-"NA"
tr2$root.edge<-0
tr3<-paste.tree(tr1,tr2)

Run the code above in your browser using DataLab