setNdsSpn: Set the branch lengths of specific nodes

Description Usage Arguments Details See Also Examples

View source: R/set-methods.R

Description

Return a tree with the spans of nodes altered.

Usage

1
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

1
2
3
4
5
6
7
8
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)

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