drop.clade {phylepic} | R Documentation |
Drop a clade from a phylogentic tree
Description
drop.clade
invokes ape::drop.tip()
on all tips descendent from the
specified node. This is convenient when used alongside ape::getMRCA()
to
drop a clade defined by the most recent common ancestor of a set of tips,
rather than exhaustively specifying all of its tips.
Usage
drop.clade(phy, node, root.edge = 0, collapse.singles = TRUE)
Arguments
phy |
an object of class "phylo". |
node |
number specifying the parent node of the clade to delete. |
root.edge , collapse.singles |
passed to |
Value
New phylo object with the chosen clade removed
Examples
library("ape")
data(bird.orders)
plot(bird.orders)
# find the common ancestor of some tips
mrca <- ape::getMRCA(bird.orders, c("Passeriformes", "Coliiformes"))
# drop the clade descending from that ancestor
plot(drop.clade(bird.orders, mrca))
[Package phylepic version 0.2.0 Index]