Return a tree with a user defined slot for node IDs.
Details
Runs setNdOther()
over multiple nodes. Parellizable.
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)
#> Tree (TreeMan Object):
#> + 10 tips
#> + 9 internal nodes
#> + Binary
#> + PD 9.04
#> + Root node is "n1"
#> + With additional node slots:
#> [confidence]
(getNdsSlt(tree, ids = tree["all"], slt_nm = "confidence"))
#> n1 n2 n3 n4 n5 n6 n7
#> 0.28263233 0.08221919 0.76798166 0.54609278 0.22432895 0.81395821 0.47604892
#> n8 n9 t1 t2 t3 t4 t5
#> 0.51545629 0.52905902 0.48469526 0.13730928 0.79144731 0.13076820 0.51335684
#> t6 t7 t8 t9 t10
#> 0.48031755 0.74643682 0.31558121 0.41289983 0.37417567