merge_branch_cat {ontophylo} | R Documentation |
Merges identical state bins over the same branch in the discretized stochastic map.
merge_branch_cat(br)
br |
numeric or character vector. The branches of the tree. |
A numeric or character vector with merged identical bins.
Sergei Tarasov
data("hym_stm")
tree <- hym_stm[[1]][[1]]
stm_discr <- discr_Simmap(tree, res = 100)
# Check some arbitrary branch.
br1 <- stm_discr$maps[[5]]
br1
br2 <- merge_branch_cat(br1)
br2
sum(br1) == br2