| tangle {EnsCat} | R Documentation |
Generate a tanglegram from two hierarchical clusterings of a data set
Description
This function generates a tanglegram of two different hierarchical clusterings of the same
dataset. This is essentially a convenience wrapper for the function tanglegram in
the package dendextend; see Galili (2015).
Usage
tangle(hc0, hc1)
Arguments
hc0 |
An object that can be coerced to a dendrogram, e.g., an object from |
hc1 |
An object that can be coerced to a dendrogram, e.g., an object from |
Details
This function is a convenience wrapper for the function tanglegram in the R package
dendextend; see http://cran.at.r-project.org/web/packages/dendextend/.
A tanglegram is used to visualize the similarities and differences between two different
hierarchical clusterings of the same dataset.
Value
An invisible dendlist, with two trees after being modified during the creation of the tanglegram
References
https://cran.r-project.org/package=dendextend, https://github.com/talgalili/dendextend/, http://www.r-statistics.com/tag/dendextend/, http://bioinformatics.oxfordjournals.org/content/31/22/3718 al Galili (2015). dendextend: an R package for visualizing, adjusting, and comparing trees of hierarchical clustering. Bioinformatics. doi:10.1093/bioinformatics/btv428
See Also
Examples
##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (hc0, hc1)
{
hcd0 <- as.dendrogram(hc0)
hcd1 <- as.dendrogram(hc1)
hcd0 <- match_order_by_labels(hcd0, hcd1)
dends_0_1 <- dendlist(hcd0, hcd1)
t <- tanglegram(dends_0_1)
t
}