merge_branch_cat {ontophylo}R Documentation

Merge state bins over branch

Description

Merges identical state bins over the same branch in the discretized stochastic map.

Usage

merge_branch_cat(br)

Arguments

br

numeric or character vector. The branches of the tree.

Value

A numeric or character vector with merged identical bins.

Author(s)

Sergei Tarasov

Examples

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


[Package ontophylo version 1.1.3 Index]