Learn R Programming

Quartet (version 1.4.0)

PairwiseQuartets: Pairwise quartet distances

Description

Computes the quartet distance between each pair of trees in a list.

Usage

PairwiseQuartets(trees, Measure = QuartetDivergence)

Value

a matrix specifying the distance between each tree and each other tree in the trees.

Arguments

trees

A list of trees of class phylo, with identically labelled tips.

Measure

a function that calculates tree similarity or difference from quartet statuses. Default is QuartetDivergence().

References

See Also

  • Use splits (groups/clades defined by nodes or edges of the tree) instead of quartets as the unit of comparison: SplitStatus().

  • Generate distance metrics from quartet statuses: SimilarityMetrics().

Other element-by-element comparisons: CompareQuartets(), CompareQuartetsMulti(), CompareSplits(), PairSharedQuartetStatus(), QuartetState(), SharedQuartetStatus(), SplitStatus()

Examples

Run this code
data("sq_trees")
# Calculate the status of each quartet relative to the first entry in 
# sq_trees
sq_status <- QuartetStatus(sq_trees)

# Calculate Estabrook et al's similarity measures:
SimilarityMetrics(sq_status)

# Compare trees that include a subset of the taxa 1..10
library("TreeTools", quietly = TRUE, warn.conflict = FALSE)
QuartetStatus(BalancedTree(1:5), BalancedTree(3:8), nTip = 10)

# If all taxa studied occur in `trees` or `cf`, set `nTip = TRUE`
QuartetStatus(BalancedTree(1:5), BalancedTree(3:10), nTip = TRUE)
 

Run the code above in your browser using DataLab