PCMTreeListAllPartitions | R Documentation |
A list of all possible (including recursive) partitions of a tree
PCMTreeListAllPartitions( tree, minCladeSize, skipNodes = character(), tableAncestors = NULL, verbose = FALSE )
tree |
a phylo object with set labels for the internal nodes |
minCladeSize |
integer indicating the minimum number of tips allowed in one part. |
skipNodes |
an integer or character vector indicating the ids or labels of nodes that should not be used as partition nodes. By default, this is an empty character vector. |
tableAncestors |
NULL (default) or an integer matrix returned by a
previous call to |
verbose |
a logical indicating if informative messages should be printed to the console. |
a list of integer vectors.
set.seed(1, kind = "Mersenne-Twister", normal.kind = "Inversion") tree <- PCMTree(ape::rtree(10)) PCMTreePlot(tree) + ggtree::geom_nodelab() + ggtree::geom_tiplab() # list of all partitions into parts of at least 4 tips PCMTreeListAllPartitions(tree, 4) # list of all partitions into parts of at least 3 tips PCMTreeListAllPartitions(tree, 3) # list all partitions into parts of at least 3 tips, excluding the partitions # where node 16 is one of the partition nodes: PCMTreeListAllPartitions(tree, minCladeSize = 3, skipNodes = "16")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.