drop.tip.treats {treats} | R Documentation |
drop.tip.treats
Description
Drop or keep tips from a "treats"
object.
Usage
## S3 method for class 'treats'
drop.tip(phy, tip, ...)
Arguments
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 |
Details
This function allows to remove or keep tips from a "treats"
object the same way as the drop.tip.phylo
function.
Value
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.
Author(s)
Thomas Guillerme
See Also
Examples
## 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"))
[Package treats version 1.1.6 Index]