Learn R Programming

TreeSearch (version 0.3.2)

EnforceOutgroup: Force taxa to form an outgroup

Description

Given a tree or a list of taxa, rearrange the ingroup and outgroup taxa such that the two are sister taxa across the root, without altering the relationships within the ingroup or within the outgroup.

Usage

EnforceOutgroup(tree, outgroup)

Arguments

tree

either a tree of class phylo, or a character vector listing the names of all the taxa in the tree, from which a random tree will be generated.

outgroup

a vector containing the names of taxa to include in the outgroup

Value

a tree where all outgroup taxa are sister to all remaining taxa, otherwise retaining the topology of the ingroup.