Learn R Programming

phytools (version 0.7-20)

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)

Arguments

tr1

receptor tree.

tr2

donor clade.

Value

A tree.

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
# NOT RUN {
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