rmTips: Remove tips from a tree

Description Usage Arguments Details See Also Examples

View source: R/manip-methods.R

Description

Returns a tree with a tip ID(s) removed

Usage

1
rmTips(tree, tids, drp_intrnl = TRUE, progress = "none")

Arguments

tree

TreeMan object

tids

tip IDs

drp_intrnl

Boolean, drop internal branches, default FALSE

progress

name of the progress bar to use, see create_progress_bar

Details

Removes tips in a tree. Set drp_intrnl to FALSE to convert internal nodes into new tips. Warning: do not use this function to remove internal nodes, this create a corrupted tree.

See Also

addTip, rmNodes, https://github.com/DomBennett/treeman/wiki/manip-methods

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(treeman)
tree <- randTree(10)
tree <- rmTips(tree, 't1')
summary(tree)
# running the function using an internal
# node will create a corrupted tree
tree <- rmTips(tree, 'n3')
# run summary() to make sure a change has
# not created a corruption
#summary(tree)

treeman documentation built on July 8, 2020, 7:28 p.m.