Return a tree with the spans of nodes altered.
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
Examples
tree <- randTree(10)
# make tree taxonomic
tree <- setNdsSpn(tree, ids = tree["all"], vals = 1)
summary(tree)
#> Tree (TreeMan Object):
#> + 10 tips
#> + 9 internal nodes
#> + Binary
#> + PD 19
#> + Root node is "n1"
# remove spns by setting all to 0
tree <- setNdsSpn(tree, ids = tree["all"], vals = 0)
summary(tree)
#> Tree (TreeMan Object):
#> + 10 tips
#> + 9 internal nodes
#> + Binary
#> + Without node spans
#> + Root node is "n1"