equals: Check if two phylogenetic trees are equal

View source: R/tree.R

equalsR Documentation

Check if two phylogenetic trees are equal

Description

Checks wether two phylogenetic trees are equivalent or not.

Usage

equals(phylotree_1, phylotree_2)

Arguments

phylotree_1

A Phylotree class object.

phylotree_2

A Phylotree class object.

Value

A boolean, TRUE if they are equal and FALSE if not.

Examples


# Load the predefined B matrices of the package
B_mats <- GeRnika::B_mats


B_real <- B_mats[[2]]$B_real
B_alg1 <- B_mats[[2]]$B_alg1


# Instantiate two \code{Phylotree} class objects on 
# the basis of the B matrices
phylotree_real <- B_to_phylotree(
                    B = B_real)
                    
phylotree_alg1 <- B_to_phylotree(
                    B = B_alg1)


equals(phylotree_real, phylotree_alg1)

GeRnika documentation built on April 3, 2025, 7:48 p.m.