Paints the branches of a tree with selective regimes for traits_ou():
every branch starts in regime "0", and the branches descending from each
node in nodes take a new regime ("1", "2", ...). Nodes are painted in
order, so a later node nested in an earlier one overrides it.
Value
Character vector with the regime of each branch, in the order of
tree$edge after reordering it "cladewise" (the order traits_ou()
uses).
Examples
tr <- ape::read.tree(text = "((a:1,b:1):1,(c:1,d:1):1);")
paint_regimes(tr, nodes = 6)
#> [1] "0" "1" "1" "0" "0" "0"
#> attr(,"order")
#> [1] "cladewise"
