path_hamming_over_all_edges {ontophylo} | R Documentation |
Calculates hamming distances for all paths in a given discretized tree.
path_hamming_over_all_edges(tree.merge)
tree.merge |
simmap object. A discretized simmap using the 'discr_Simmap' function where identical state bins were merged using the 'merge_tree_cat' function. |
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.
Sergei Tarasov
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