TreeTools (version 0.1.3)

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 changing 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

Character vector containing the names of taxa to include in the outgroup.

Value

EnforceOutgroup returns a tree of class phylo where all outgroup taxa are sister to all remaining taxa, without modifying the ingroup topology.

Examples

Run this code
# NOT RUN {
tree <- EnforceOutgroup(letters[1:9], letters[1:3])
plot(tree)

# }

Run the code above in your browser using DataCamp Workspace