View source: R/helpers_phylo.R
drop.clade | R Documentation |
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.
drop.clade(phy, node, root.edge = 0, collapse.singles = TRUE)
phy |
an object of class "phylo". |
node |
number specifying the parent node of the clade to delete. |
root.edge , collapse.singles |
passed to |
New phylo object with the chosen clade removed
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.