drop.tip-methods: drop.tip method

drop.tipR Documentation

drop.tip method

Description

drop.tip method

Usage

drop.tip(object, tip, ...)

keep.tip(object, tip, ...)

## S4 method for signature 'treedata'
drop.tip(object, tip, ...)

## S4 method for signature 'phylo'
drop.tip(object, tip, ...)

## S4 method for signature 'treedata'
keep.tip(object, tip, ...)

## S4 method for signature 'phylo'
keep.tip(object, tip, ...)

Arguments

object

A treedata or phylo object

tip

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

...

additional parameters

Value

updated object

Author(s)

Casey Dunn http://dunnlab.org and Guangchuang Yu https://guangchuangyu.github.io

Source

drop.tip for phylo object is a wrapper method of ape::drop.tip from the ape package. The documentation you should read for the drop.tip function can be found here: drop.tip

See Also

drop.tip

Examples

library(tidytree)
set.seed(123)
tr <- ape::rtree(6)
da <- data.frame(id=tip.label(tr), value = letters[seq_len(6)])
trda <- tr %>% dplyr::left_join(da, by = c('label'='id'))
tr1 <- drop.tip(tr, c("t2", "t1"))
tr2 <- keep.tip(tr, c("t2", "t1"))

YuLab-SMU/tidytree documentation built on April 10, 2024, 9:25 a.m.