View source: R/drop.tip.treats.R
drop.tip.treats | R Documentation |
Drop or keep tips from a "treats"
object.
## S3 method for class 'treats'
drop.tip(phy, tip, ...)
phy |
an object of class |
tip |
a vector of mode numeric or character specifying the tips to delete or to keep. |
... |
any additional argument to be passed to |
This function allows to remove or keep tips from a "treats"
object the same way as the drop.tip.phylo
function.
This function outputs either a "phylo"
object if no traits where generated or a treats
object that is a list of at least two elements: $tree
, a "phylo"
object and $data
, a "matrix"
of the trait values.
Thomas Guillerme
treats
## A treats object with one trait and 20 tips
my_treats <- treats(stop.rule = list(max.taxa = 20),
traits = make.traits())
## Removing five tips
drop.tip.treats(my_treats, tip = c("t1", "t2", "t3", "t4", "t5"))
## Keeping these five tips
drop.tip.treats(my_treats, tip = c("t1", "t2", "t3", "t4", "t5"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.