SplitsCompatible: Are splits compatible?

View source: R/tree_distance.R

SplitsCompatibleR Documentation

Are splits compatible?

Description

Determine whether splits are compatible (concave); i.e. they can both occur on a single tree.

Usage

SplitsCompatible(split1, split2)

Arguments

split1, split2

Logical vectors listing leaves in a consistent order, identifying each leaf as a member of the ingroup (TRUE) or outgroup (FALSE) of the split in question.

Value

SplitsCompatible() returns a logical specifying whether the splits provided are compatible with one another.

Author(s)

Martin R. Smith (martin.smith@durham.ac.uk)

Examples

A <- TRUE
B <- FALSE
SplitsCompatible(c(A, A, A, B, B, B),
                 c(A, A, B, B, B, B))
SplitsCompatible(c(A, A, A, B, B, B),
                 c(A, A, B, B, B, A))

TreeDist documentation built on Oct. 26, 2023, 1:07 a.m.