setNdsID: Set the IDs of multiple nodes

Description Usage Arguments Details See Also Examples

View source: R/set-methods.R

Description

Return a tree with the IDs of nodes altered.

Usage

1
setNdsID(tree, ids, vals, parallel = FALSE, progress = "none")

Arguments

tree

TreeMan object

ids

ids to be changed

vals

new ids

parallel

logical, make parallel?

progress

name of the progress bar to use, see create_progress_bar

Details

Runs setNdID() over multiple nodes. Warning: all IDs must be unique, avoid spaces in IDs, only use numbers, letters and underscores. Parellizable.

See Also

setNdID https://github.com/DomBennett/treeman/wiki/set-methods

Examples

1
2
3
4
5
library(treeman)
tree <- randTree(10)
new_ids <- paste0('heffalump_', 1:tree['ntips'])
tree <- setNdsID(tree, tree['tips'], new_ids)
summary(tree)

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