merge_tree_cat {ontophylo}R Documentation

Merge state bins over a tree

Description

Merges identical state bins over a tree in the discretized stochastic map.

Usage

merge_tree_cat(tree)

Arguments

tree

simmap object.

Value

A tree with merged identical bins.

Author(s)

Sergei Tarasov

Examples

data("hym_stm")
tree <- hym_stm[[1]][[1]]
tree <- discr_Simmap(tree, res = 100)
stm_merg <- merge_tree_cat(tree)
# Check some arbitrary branch.
br1 <- tree$maps[[5]]
br1
br2 <- stm_merg$maps[[5]]
br2
sum(br1) == br2


[Package ontophylo version 1.1.3 Index]