rmNodes: Remove nodes from a tree

Description Usage Arguments Details See Also Examples

View source: R/manip-methods.R

Description

Returns a tree with a node ID(s) removed

Usage

1
rmNodes(tree, nids, progress = "none")

Arguments

tree

TreeMan object

nids

internal node IDs

progress

name of the progress bar to use, see create_progress_bar

Details

Removes nodes in a tree. Joins the nodes following to the nodes preceding the node to be removed. Creates polytomies. Warning: do not use this function to remove tip nodes, this create a corrupted tree.

See Also

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

Examples

1
2
3
4
library(treeman)
tree <- randTree(10)
tree <- rmNodes(tree, 'n3')
summary(tree)  # tree is now polytmous

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