equals {GeRnika} | R Documentation |
Checks wether two phylogenetic trees are equivalent or not.
equals(phylotree_1, phylotree_2)
phylotree_1 |
A |
phylotree_2 |
A |
A boolean, TRUE
if they are equal and FALSE
if not.
# Load the predefined B matrices of the package
B_mats <- GeRnika::B_mats
B_real <- B_mats[[2]]$B_real
B_opt <- B_mats[[2]]$B_opt
# Instantiate two \code{Phylotree} class objects on
# the basis of the B matrices
phylotree_real <- B_to_phylotree(
B = B_real)
phylotree_opt <- B_to_phylotree(
B = B_opt)
equals(phylotree_real, phylotree_opt)