treeman (version 1.1.3)

setNdsSpn: Set the branch lengths of specific nodes

Description

Return a tree with the spans of nodes altered.

Usage

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

Arguments

tree

TreeMan object

ids

ids of nodes whose preceding edges are to be changed

vals

new spans

parallel

logical, make parallel?

progress

name of the progress bar to use, see create_progress_bar

Details

Runs setNdSpn over multiple nodes. Parallelizable.

See Also

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

Examples

Run this code
# NOT RUN {
library(treeman)
tree <- randTree(10)
# make tree taxonomic
tree <- setNdsSpn(tree, ids=tree['all'], vals=1)
summary(tree)
# remove spns by setting all to 0
tree <- setNdsSpn(tree, ids=tree['all'], vals=0)
summary(tree)
# }

Run the code above in your browser using DataCamp Workspace