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

NSplits

Number of distinct splits


Description

NSplits() counts the unique bipartition splits in a tree or object.

Usage

NSplits(x)

NPartitions(x)

## S3 method for class 'phylo'
NSplits(x)

## S3 method for class 'list'
NSplits(x)

## S3 method for class 'multiPhylo'
NSplits(x)

## S3 method for class 'Splits'
NSplits(x)

## S3 method for class 'numeric'
NSplits(x)

## S3 method for class ''NULL''
NSplits(x)

## S3 method for class 'ClusterTable'
NSplits(x)

## S3 method for class 'character'
NSplits(x)

Arguments

x

A phylogenetic tree of class phylo; a list of such trees (of class list or multiPhylo); a Splits object; a vector of integers; or a character vector listing tips of a tree, or a character of length one specifying a tree in Newick format.

Value

NSplits() returns an integer specifying the number of bipartitions in the specified objects, or in a binary tree with x tips.

Author(s)

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

See Also

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

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

Examples

NSplits(8L)
NSplits(PectinateTree(8))
NSplits(as.Splits(BalancedTree(8)))

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.