setNdsOther: Set a user defined slot for multiple nodes

View source: R/a.R

setNdsOtherR Documentation

Set a user defined slot for multiple nodes

Description

Return a tree with a user defined slot for node IDs.

Usage

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

Arguments

tree

TreeMan object

ids

id sof the nodes

vals

data for slot

slt_nm

slot name

parallel

logical, make parallel?

progress

name of the progress bar to use, see create_progress_bar

Details

Runs setNdOther() over multiple nodes. Parellizable.

See Also

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

Examples


tree <- randTree(10)
# e.g. confidences for nodes
vals <- runif(min = 0, max = 1, n = tree["nall"])
tree <- setNdsOther(tree, tree["all"], vals, "confidence")
tree <- updateSlts(tree)
summary(tree)
(getNdsSlt(tree, ids = tree["all"], slt_nm = "confidence"))

ropensci/phylotaR documentation built on July 9, 2023, 3:17 p.m.