Skip to contents

Reports whether splits are present or contradicted in a set of reference splits.

Usage

CompareSplits(splits, splits2)

CompareBipartitions(splits, splits2)

Arguments

splits

An object that can be coerced into class Splits using as.Splits.

splits2

Splits against which to compare splits.

Value

A named vector of eight integers, listing the number of unique splits that:

  • N exist in total; i.e. the number of splits in splits1 plus the number in splits2, equivalent to 2 s + d1 + d2 + r1 + r2;

  • P1 occur in splits1

  • P2 occur in splits2

  • s occur in both splits1 and splits2;

  • d1 occur in splits1 but are contradicted by splits2;

  • d2 occur in splits2 but are contradicted by splits1;

  • r1 occur in splits1 only, being neither present in nor contradicted by splits2;

  • r2 occur in splits2 only, being neither present in nor contradicted by splits1;

  • RF occur in one tree only; i.e. d1 + d2 + r1 + r2, the Robinson-Foulds distance.

References

  • Estabrook1985Quartet

  • Robinson1981Quartet

See also

Equivalent function for quartets: CompareQuartets()

Other element-by-element comparisons: CompareQuartets(), CompareQuartetsMulti(), PairSharedQuartetStatus(), QuartetState(), SharedQuartetStatus(), SplitStatus()

Examples

splits1 <- TreeTools::BalancedTree(8)
splits2 <- TreeTools::PectinateTree(8)

CompareSplits(splits1, splits2)
#>  N P1 P2  s d1 d2 r1 r2 
#> 10  5  5  3  2  2  0  0