path_hamming_over_all_edges {ontophylo}R Documentation

Hamming distances for a tree

Description

Calculates hamming distances for all paths in a given discretized tree.

Usage

path_hamming_over_all_edges(tree.merge)

Arguments

tree.merge

simmap object. A discretized simmap using the 'discr_Simmap' function where identical state bins were merged using the 'merge_tree_cat' function.

Value

A tibble with information on state changes, time spent on each state, edge IDs, absolute and normalized hamming distances for all edges in a tree.

Author(s)

Sergei Tarasov

Examples

data("hym_stm_amalg")
# Get one sample of stochastic maps from head.
tree <- hym_stm_amalg$head[[1]]
tree <- merge_tree_cat(tree)


  # Calculate hamming distances.
  ph <- suppressWarnings(path_hamming_over_all_edges(tree))
  ph




[Package ontophylo version 1.1.3 Index]