R: Set the branch lengths of specific nodes

setNdsSpn {treeman} | R Documentation

## 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

    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)

[Package treeman version 1.1.4 Index]