AllQuartets | R Documentation |
Lists all choices of four taxa from a tree.
A more computationally efficient alternative to combn
.
AllQuartets(nTips)
## S3 method for class 'numeric'
AllQuartets(nTips)
## S3 method for class 'phylo'
AllQuartets(nTips)
nTips |
Integer, specifying the number of tips in a tree; or a tree, whose tips will be counted. |
AllQuartets()
returns a matrix with four rows and
choose(n_tips, 4)
columns, with each column corresponding to a unique
selection of four different integers less than or equal to nTips
.
Martin R. Smith (martin.smith@durham.ac.uk)
States of quartets in given trees: QuartetStates()
Other quartet counting functions:
CompareQuartets()
,
CompareQuartetsMulti()
,
ResolvedQuartets()
AllQuartets(5)
combn(5, 4) # Provides the same information, but for large
# values of n_tips is significantly slower.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.