Learn R Programming

TreeTools (version 1.12.0)

NPartitionPairs: Distributions of tips consistent with a partition pair

Description

NPartitionPairs() calculates the number of terminal arrangements matching a specified configuration of two splits.

Usage

NPartitionPairs(configuration)

Value

The number of ways to distribute sum(configuration) taxa according to the specified pattern.

Arguments

configuration

Integer vector of length four specifying the number of terminals that occur in both (1) splits A1 and A2; (2) splits A1 and B2; (3) splits B1 and A2; (4) splits B1 and B2.

Details

Consider splits that divide eight terminals, labelled A to H.

Bipartition 1:ABCD:EFGHA1 = ABCDB1 = EFGH
Bipartition 2:ABE:CDFGHA2 = ABEB2 = CDFGH

This can be represented by an association matrix:

A2B2
A1ABC
B1EFGH

The cells in this matrix contain 2, 1, 1 and 3 terminals respectively; this four-element vector (c(2, 1, 1, 3)) is the configuration implied by this pair of bipartition splits.

Examples

Run this code
NPartitionPairs(c(2, 1, 1, 3))

Run the code above in your browser using DataLab