SplitStatus | R Documentation |
Calculates how many of the partitions present in tree 1 are also present in
tree 2 (s
),
how many of the partitions in tree 1 are absent in tree 2 (d1
),
and how many of the partitions in tree 2 are absent in tree 1 (d2
).
The Robinson-Foulds (symmetric partition) distance is the sum of the
latter two quantities, i.e. d1
+ d2
.
SplitStatus(trees, cf = trees[[1]]) SharedSplitStatus(trees, cf)
trees |
A list of trees of class |
cf |
Comparison tree of class |
Returns a two dimensional array. Rows correspond to the input trees, and are named if names were present. Columns report:
N: The total number of partitions present in the two trees, i.e. P1 + P2.
P1: The number of partitions present in tree 1.
P2: The number of partitions present in tree 2.
s: The number of partitions present in both trees.
d1: The number of partitions present in tree 1, but contradicted by tree 2.
d2: The number of partitions present in tree 2, but contradicted by tree 1.
r1: The number of partitions present in tree 1, and neither present nor contradicted in tree 2.
r2: The number of partitions present in tree 2, and neither present nor contradicted in tree 1.
SharedSplitStatus
: Reports split statistics obtained after removing all
tips that do not occur in both trees being compared.
Martin R. Smith (martin.smith@durham.ac.uk)
Robinson1981Quartet
Penny1985Quartet
Other element-by-element comparisons:
CompareQuartetsMulti()
,
CompareQuartets()
,
CompareSplits()
,
PairSharedQuartetStatus()
,
QuartetState()
,
SharedQuartetStatus()
data('sq_trees') # Calculate the status of each quartet splitStatuses <- SplitStatus(sq_trees) # Calculate the raw symmetric difference (i.e. Robinson–Foulds distance) RawSymmetricDifference(splitStatuses) # Normalize the Robinson Foulds distance by dividing by the number of # splits present in the two trees: RawSymmetricDifference(splitStatuses) / splitStatuses[, 'N'] # Normalize the Robinson Foulds distance by dividing by the total number of # splits that it is possible to resolve for `n` tips: nTip <- length(sq_trees[[1]]$tip.label) nPartitions <- 2 * (nTip - 3L) # Does not include the nTip partitions that # comprise but a single tip RawSymmetricDifference(splitStatuses) / nPartitions
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.