drop.tip.treats: drop.tip.treats

View source: R/drop.tip.treats.R

drop.tip.treatsR 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 "treats".

tip

a vector of mode numeric or character specifying the tips to delete or to keep.

...

any additional argument to be passed to drop.tip.phylo.

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

treats

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"))


TGuillerme/dads documentation built on July 16, 2025, 9:14 p.m.