Each subset of nNodes distinct internal or tip nodes defines a partition of the branches of the tree into nNodes+1 blocks called parts. This function generates partitions where each part has nNodes splitting nodes and contains at least minCladeSize tips.

PCMTreeListCladePartitions(
  tree,
  nNodes,
  minCladeSize = 0,
  skipNodes = character(0),
  tableAncestors = NULL,
  countOnly = FALSE,
  verbose = FALSE
)

Arguments

tree

a phylo object

nNodes

an integer giving the number of partitioning nodes. There would be nNodes+1 blocks in each partition (see details).

minCladeSize

integer indicating the minimum number of tips allowed in a clade.

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 PCMTreeTableAncestors(tree).

countOnly

logical indicating if the only the number of partitions should be returned.

verbose

a logical indicating if informative messages should be printed to the console.

Value

a list of integer nNodes-vectors. By default a full traversal of all partitions is done. It is possible to truncate the search to a limited number of partitions by setting the option PCMBase.MaxLengthListCladePartitions to a finite positive integer.

See also