Cophenetic {DECIPHER} | R Documentation |
Calculates the matrix of cophenetic distances represented by a dendrogram object.
Cophenetic(x)
x |
A dendrogram object. |
The cophenetic distance between two observations is defined as the branch length separating them on a dendrogram. This function differs from the cophenetic
function in that it does not assume the tree is ultrametric and outputs the branch length separating pairs of observations rather than the height of their merger. A dendrogram that better preserves a distance matrix will show higher correlation between the distance matrix and it cophenetic distances.
An object of class 'dist'.
Erik Wright eswright@pitt.edu
fas <- system.file("extdata", "Bacteria_175seqs.fas", package="DECIPHER") dna <- readDNAStringSet(fas) d1 <- DistanceMatrix(dna, type="dist") dend <- IdClusters(d1, method="NJ", type="dendrogram") d2 <- Cophenetic(dend) cor(d1, d2)