I need to paint manually some phylogenetic trees into two regimes, "0" and "1". I found out that it is possible to do that with the functions paintSubTree() and paintBranches() from the phytools package. The problem is that by using these functions, one can paint the trees only by specific branches or nodes:
library(ape)
library(phytools)
tree <- rtree(4)
tree <- paintBranches(tree = tree, edge = 4, state = "1", anc.state="0")
plotSimmap(tree,lwd=4)
I need to paint the tree according to the edge.length, e.g., at time 0.7 (so that only the middle of branch t4 would be red). Is there a function that could be used for that purpose?
