Learn R Programming

TreeSearch (version 0.3.2)

UniqueSplits: Unique Splits

Description

Removes equivalent duplicates from a matrix of bipartitions.

Usage

UniqueSplits(splits, preserveParity = FALSE)

Arguments

splits

A logical matrix containing one named row corresponding to each terminal leaf of a tree, and each column corresponds to a bipartition split; each split divides terminals into two bipartitions; members of one are marked TRUE and members of the other are marked FALSE.

preserveParity

Logical specifying whether to preserve the TRUE and FALSE status within each split (which takes marginally longer). If FALSE, each split will be defined such that taxa in the same partition as the first element are marked FALSE, and other taxa marked TRUE.

Value

The splits element, with all duplicate splits removed.

Examples

Run this code
# NOT RUN {
  set.seed(1)
  splits <- Tree2Splits(ape::rtree(6, br=NULL))
  UniqueSplits(splits, preserveParity=TRUE)

# }

Run the code above in your browser using DataLab