Learn R Programming

treeman (version 1.1.4)

setNdsID: Set the IDs of multiple nodes

Description

Return a tree with the IDs of nodes altered.

Usage

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

Run this code
# NOT RUN {
library(treeman)
tree <- randTree(10)
new_ids <- paste0('heffalump_', 1:tree['ntips'])
tree <- setNdsID(tree, tree['tips'], new_ids)
summary(tree)
# }

Run the code above in your browser using DataLab