Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

TipsInSplits

Tips contained within splits


Description

TipsInSplits() specifies the number of tips that occur within each bipartition split in a Splits object.

Usage

TipsInSplits(splits, keep.names = TRUE, ...)

## S3 method for class 'Splits'
TipsInSplits(splits, keep.names = TRUE, ...)

## S3 method for class 'phylo'
TipsInSplits(splits, keep.names = TRUE, ...)

SplitImbalance(splits, keep.names = TRUE, ...)

## S3 method for class 'Splits'
SplitImbalance(splits, keep.names = TRUE, ...)

## S3 method for class 'phylo'
SplitImbalance(splits, keep.names = TRUE, ...)

Arguments

splits

Object of class Splits or phylo.

keep.names

Logical specifying whether to include the names of splits in the output.

...

Additional parameters to pass to as.Splits().

Value

TipsInSplits() returns a named vector of integers, specifying the number of tips contained within each split in splits.

SplitImbalance() returns a named vector of integers, specifying the number of leaves within a split that are not 'balanced' by a leaf outside it; i.e. a split that divides leaves evenly has an imbalance of zero; one that splits two tips from ten has an imbalance of 10 - 2 = 8.

See Also

Other Splits operations: LabelSplits(), NSplits(), NTip(), SplitFrequency(), SplitsInBinaryTree(), TipLabels(), as.Splits(), match()

Examples

tree <- PectinateTree(8)
splits <- as.Splits(tree)
TipsInSplits(splits)

plot(tree)
LabelSplits(tree, as.character(splits), frame = 'none', pos = 3L, cex = 0.7)
LabelSplits(tree, TipsInSplits(splits), unit = ' tips', frame = 'none',
            pos = 1L)

TreeTools

Create, Modify and Analyse Phylogenetic Trees

v1.4.4
GPL (>= 3)
Authors
Martin R. Smith [aut, cre, cph] (<https://orcid.org/0000-0001-5660-1727>), Emmanuel Paradis [cph] (<https://orcid.org/0000-0003-3092-2199>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.