extract.parsimonyNumber
takes the two matrices computed by
parsimonyNumber
, and compute the actual number of parsimonious
solution for any subtree starting from a given node.
# S3 method for parsimonyNumber
extract(x, node = attr(x$nbrReconstructions,
"ntaxa") + 1, what = c("number", "cost"), ...)
an object of class "parsimonyNumber
", result of function
parsimonyNumber
.
the root node of the subtree. By default, the root of the tree.
the quantity to retrieve. Either "number" for the number of solutions, or "cost" for the minimal cost of a solution. Default to "number".
unused
An integer giving the number of equivalent parsimonious solutions.
The parsimonious solutions are the one with the minimum number of shifts (that are given by matrice costReconstructions). This function sums the number of solutions (given in matrice nbrReconstructions) that have the minimum number of shifts.