Learn R Programming

TreeTools (version 1.12.0)

TrivialSplits: Identify and remove trivial splits

Description

TrivialSplits() identifies trivial splits (which separate one or zero leaves from all others); WithoutTrivialSplits() removes them from a Splits object.

Usage

TrivialSplits(splits, nTip = attr(splits, "nTip"))

WithoutTrivialSplits(splits, nTip = attr(splits, "nTip"))

Value

TrivialSplits() returns a logical vector specifying whether each split in splits is trivial, i.e. includes or excludes only a single tip or no tips at all.

WithoutTrivialSplits() returns a Splits object with trivial splits removed.

Arguments

splits

An object of class Splits.

nTip

Integer specifying number of tips (leaves).

See Also

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

Examples

Run this code
splits <- as.Splits(PectinateTree(letters[1:9]))
efgh <- Subsplit(splits, tips = letters[5:8], keepAll = TRUE)
summary(efgh)

TrivialSplits(efgh)
summary(WithoutTrivialSplits(efgh))

Run the code above in your browser using DataLab