cladesub: substitute a clade with another clade replaces a specified...

View source: R/cladesub.R

cladesubR Documentation

substitute a clade with another clade replaces a specified crown clade in a tree with a specified crown clade from a second tree.

Description

substitute a clade with another clade

replaces a specified crown clade in a tree with a specified crown clade from a second tree.

Usage

cladesub(tree1, tree2, tips1, tips2 = NULL, use.stem = "tree1")

Arguments

tree1

phylo object containing the clade that will be replaced

tree2

phylo object containing the replacement clade; if tips2 is NULL, then tree2 must be rooted

tips1

vector with tip names in tree1 with MRCA defining the clade to be replaced

tips2

NULL (default) or a vector with tip names in tree2 with MRCA defining the replacement clade; if NULL, then tree2 is the replacement clade.

use.stem

One of "tree1", "tree2", or "diff" (Default "tree1"). Determines the stem branch length of the substitute clade on the output tree. Setting to "tree1" or "tree2" uses the stem branch length of the clade to be replaced on tree1 or the replacement clade on tree2, respectively.

Value

phylo object


JeffWeinell/misc.wrappers documentation built on Sept. 20, 2023, 12:42 p.m.