This function slices a tree at a particular height above the root and returns all subtrees or all non-trivial subtrees (i.e., subtrees with more than 1 taxon). Uses extract.clade
in the "ape" package.
It can also be used to crop the terminal fraction of a tree for orientation="rootwards"
.
treeSlice(tree, slice, trivial=FALSE, prompt=FALSE, ...)
An object of class "phylo"
or "multiPhylo"
.
is a phylogenetic tree in "phylo"
format.
a real number indicating the height above the root at which to slice the tree.
a logical value indicating whether or not to return subtrees with a number of tips less than two (default is FALSE
).
logical value indicating whether or not the height of the slice should be given interactively.
for prompt=TRUE
, other arguments to be passed to plotTree
. In addition, the argument orientation
can be used to specify whether the "tipwards"
subtrees or the "rootwards"
phylogeny are/is to be returned by the function call (using those two argument values, respectively).
Liam Revell liam.revell@umb.edu
Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.
extract.clade