Learn R Programming

phytools (version 1.0-3)

paste.tree: Paste two trees together

Description

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

Usage

paste.tree(tr1, tr2)

Value

A tree.

Arguments

tr1

receptor tree.

tr2

donor clade.

Author

Liam Revell liam.revell@umb.edu

Details

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

References

Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.

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