Learn R Programming

TreeTools (version 1.16.1)

SplitConsistent: Identify consistent / conflicting splits

Description

SplitConsistent() and SplitConflict() determine whether a series of splits haystack are consistent with or contradict the focal split needle.

Usage

SplitConsistent(needle, haystack)

SplitConflicts(needle, haystack)

Value

SplitConsistent() returns a list of logical vectors. Each list item corresponds to an entry in haystack, reporting whether each split is consistent with (TRUE) or in conflict with (FALSE) needle. SplitConflicts() returns the inverse.

Arguments

needle

Splits object containing the single split to evaluate

haystack

Splits object, or list thereof, containing the splits to compare against needle.

See Also

Other split manipulation functions: DropTip(), Subsplit(), TrivialSplits()

Examples

Run this code
splits1 <- as.Splits(BalancedTree(8))
splits2 <- as.Splits(PectinateTree(8))
summary(splits1[[4]])
SplitConsistent(splits1[[4]], splits2)
SplitConflicts(splits1[[4]], list(splits1, splits2))

Run the code above in your browser using DataLab