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

SplitsInBinaryTree

Maximum splits in an n-leaf tree


Description

SplitsInBinaryTree() is a convenience function to calculate the number of splits in a fully-resolved (binary) tree with n leaves.

Usage

SplitsInBinaryTree(tree)

## S3 method for class 'list'
SplitsInBinaryTree(tree)

## S3 method for class 'multiPhylo'
SplitsInBinaryTree(tree)

## S3 method for class 'numeric'
SplitsInBinaryTree(tree)

## S3 method for class ''NULL''
SplitsInBinaryTree(tree)

## Default S3 method:
SplitsInBinaryTree(tree)

## S3 method for class 'Splits'
SplitsInBinaryTree(tree)

## S3 method for class 'phylo'
SplitsInBinaryTree(tree)

Arguments

tree

An object of a supported format that represents a tree or set of trees, from which the number of leaves will be calculated.

Value

SplitsInBinaryTree() returns an integer vector detailing the number of unique non-trivial splits in a binary tree with n leaves.

Author(s)

Martin R. Smith (martin.smith@durham.ac.uk)

See Also

Other tree properties: ConsensusWithout(), NSplits(), NTip(), TipLabels(), TreeIsRooted()

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

Examples

tree <- TreeTools::BalancedTree(8)
SplitsInBinaryTree(tree)
SplitsInBinaryTree(TreeTools::as.Splits(tree))
SplitsInBinaryTree(8)
SplitsInBinaryTree(list(tree, tree))

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.