Package: dendextend 1.19.0

Tal Galili

dendextend: Extending 'dendrogram' Functionality in R

Offers a set of functions for extending 'dendrogram' objects in R, letting you visualize and compare trees of 'hierarchical clusterings'. You can (1) Adjust a tree's graphical parameters - the color, size, type, etc of its branches, nodes and labels. (2) Visually and statistically compare different 'dendrograms' to one another.

Authors:Tal Galili [aut, cre, cph], Yoav Benjamini [ths], Gavin Simpson [ctb], Gregory Jefferis [aut, ctb], Marco Gallotta [ctb], Johan Renaudie [ctb], The R Core Team [ctb], Kurt Hornik [ctb], Uwe Ligges [ctb], Andrej-Nikolai Spiess [ctb], Steve Horvath [ctb], Peter Langfelder [ctb], skullkey [ctb], Mark Van Der Loo [ctb], Andrie de Vries [ctb], Zuguang Gu [ctb], Cath [ctb], John Ma [ctb], Krzysiek G [ctb], Manuela Hummel [ctb], Chase Clark [ctb], Lucas Graybuck [ctb], jdetribol [ctb], Ben Ho [ctb], Samuel Perreault [ctb], Christian Hennig [ctb], David Bradley [ctb], Houyun Huang [ctb], Patrick Schupp [ctb], Alec Buetow [ctb]

dendextend_1.19.0.tar.gz
dendextend_1.19.0.zip(r-4.5)dendextend_1.19.0.zip(r-4.4)dendextend_1.19.0.zip(r-4.3)
dendextend_1.19.0.tgz(r-4.4-any)dendextend_1.19.0.tgz(r-4.3-any)
dendextend_1.19.0.tar.gz(r-4.5-noble)dendextend_1.19.0.tar.gz(r-4.4-noble)
dendextend_1.19.0.tgz(r-4.4-emscripten)dendextend_1.19.0.tgz(r-4.3-emscripten)
dendextend.pdf |dendextend.html
dendextend/json (API)
NEWS

# Install 'dendextend' in R:
install.packages('dendextend', repos = c('https://phylotastic.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/talgalili/dendextend/issues

Datasets:
  • khan - Microarray gene expression dataset from Khan et al., 2001. Subset of 306 genes.

On CRAN:

17.08 score 153 stars 156 packages 6.2k scripts 99k downloads 201 mentions 151 exports 30 dependencies

Last updated 6 days agofrom:5c0b7ab2ed. Checks:OK: 7. Indexed: no.

TargetResultDate
Doc / VignettesOKNov 15 2024
R-4.5-winOKNov 15 2024
R-4.5-linuxOKNov 15 2024
R-4.4-winOKNov 15 2024
R-4.4-macOKNov 15 2024
R-4.3-winOKNov 15 2024
R-4.3-macOKNov 15 2024

Exports:%>%all_couple_rotations_at_kall_uniqueas_hclust_fixedas.dendlistas.ggdendassign_dendextend_optionsassign_values_to_branches_edgeParassign_values_to_leaves_edgeParassign_values_to_leaves_nodeParassign_values_to_nodes_nodeParBkBk_permutationsBk_plotbranches_attr_by_clustersbranches_attr_by_labelsbranches_attr_by_listsbranches_colorcirclize_dendrogramclick_rotatecollapse_branchcollapse_labelscolor_branchescolor_labelscolor_unique_labelscolored_barscolored_dotscolour_branchescommon_subtrees_clusterscor_bakers_gammacor_common_nodescor_copheneticcor_FM_indexcor.dendlistcount_terminal_nodescut_lower_funcutreecutree_1h.dendrogramcutree_1k.dendrogramdend_diffdend_expenddendbackbackdendextend_optionsdendlistDendSer.dendrogramdist_longdist.dendlistdistinct_edgesduplicate_leafentanglementfac2numfind_dendfind_dendrogramfind_kfix_members_attr.dendrogramflatten.dendrogramflip_leavesFM_indexFM_index_permutationFM_index_Rget_branches_heightsget_childrens_heightsget_leaves_attrget_leaves_branches_attrget_leaves_branches_colget_leaves_edgeParget_leaves_nodeParget_nodes_attrget_nodes_xyget_root_branches_attrget_subdendrogramsggdendhang.dendrogramhas_component_in_attributehas_edgeParhas_nodeParheights_per_k.dendrogramhighlight_brancheshighlight_branches_colhighlight_branches_lwdhighlight_distinct_edgesintersect_treesis.dendlistis.dendrogramis.distis.hclustis.natural.numberis.phylolabels_cexlabels_cex<-labels_collabels_colorslabels_colors<-labels<-ladderizeleaf_colorsleaf_Colorslowest_common_branchmatch_order_by_labelsmatch_order_dendrogram_by_old_ordermax_depthmin_depthna_locfnleavesnnodesnoded_with_conditionorder.dendrogram<-order.hclustpartition_leavesplace_labelsplot_horiz.dendrogramprepare.ggdendpruneprune_common_subtrees.dendlistprune_leafpvclust_edgespvclust_show_signifpvclust_show_signif_gradientpvrect2raise.dendrogramrank_branchesrank_order.dendrogramrank_values_with_clustersrect.dendrogramreindex_dendremove_branches_edgeParremove_leaves_nodeParremove_nodes_nodeParrotaterotate_DendSersample.dendrogramseriate_dendrogramsetset_labelsshufflesort_2_clusters_vectorssort_dist_matsort_levels_valuestanglegramtheme_dendrounbranchunclass_denduntangleuntangle_DendSeruntangle_labelsuntangle_random_searchuntangle_step_rotate_1sideuntangle_step_rotate_2sideuntangle_step_rotate_both_sidewhich_leafwhich_node

Dependencies:clicolorspacefansifarverggplot2gluegridExtragtableisobandlabelinglatticelifecyclemagrittrMASSMatrixmgcvmunsellnlmepillarpkgconfigR6RColorBrewerrlangscalestibbleutf8vctrsviridisviridisLitewithr

Quick Introduction

Rendered fromQuick_Introduction.Rmdusingknitr::rmarkdownon Nov 15 2024.

Last update: 2020-08-24
Started: 2015-06-28

Frequently asked questions

Rendered fromFAQ.Rmdusingknitr::rmarkdownon Nov 15 2024.

Last update: 2022-07-03
Started: 2015-05-23

Hierarchical cluster analysis on famous data sets - enhanced with the dendextend package

Rendered fromCluster_Analysis.Rmdusingknitr::rmarkdownon Nov 15 2024.

Last update: 2022-07-03
Started: 2015-05-23

Introduction to dendextend

Rendered fromdendextend.Rmdusingknitr::rmarkdownon Nov 15 2024.

Last update: 2023-03-25
Started: 2019-07-17

Readme and manuals

Help Manual

Help pageTopics
Functions for extending dendrogram objectsdendextend-package dendextend
Rotate tree branches for kall_couple_rotations_at_k
Check if all the elements in a vector are uniqueall_unique
Global Comparison of two (or more) dendrogramsall.equal.dendlist all.equal.dendrogram
Convert dendrogram Objects to Class hclustas_hclust_fixed
Try to coerce something into a dendlistas.dendlist
Convert a dendrogram into phyloas.phylo.dendrogram
Populates dendextend functions into dendextend_optionsassign_dendextend_options
Assign values to edgePar of dendrogram's branchesassign_values_to_branches_edgePar
Assign values to edgePar of dendrogram's leavesassign_values_to_leaves_edgePar
Assign values to nodePar of dendrogram's leavesassign_values_to_leaves_nodePar
Assign values to nodePar of dendrogram's nodesassign_values_to_nodes_nodePar
Bakers Gamma for two k matricesbakers_gamma_for_2_k_matrix
Bk - Calculating Fowlkes-Mallows Index for two dendrogramBk
Bk permutation - Calculating Fowlkes-Mallows Index for two dendrogramBk_permutations
Bk plot - ploting the Fowlkes-Mallows Index of two dendrogram for various k'sBk_plot
Change col/lwd/lty of branches based on clustersbranches_attr_by_clusters
Change col/lwd/lty of branches matching labels conditionbranches_attr_by_labels
Change col/lwd/lty of branches from the root down to clusters defined by list of labels of respective membersbranches_attr_by_lists
Plot a circlized dendrogramscirclize_dendrogram
Interactively rotate a tree objectclick_rotate click_rotate.default click_rotate.dendrogram
Collapse branches under a tolerance levelcollapse_branch
Collapse a sub dendrogram of adjacent labels within a dendcollapse_labels
Color tree's branches according to sub-clustersbranches_color color_branches colour_branches
Color dend's labels according to sub-clusterscolor_labels colour_labels
Color unique labels in a dendrogramcolor_unique_labels
Add colored bars to a dendrogramcolored_bars
Add colored dots beside a dendrogramcolored_dots
Find clusters of common subtreescommon_subtrees_clusters
Baker's Gamma correlation coefficientcor_bakers_gamma cor_bakers_gamma.default cor_bakers_gamma.dendlist cor_bakers_gamma.dendrogram cor_bakers_gamma.hclust
Proportion of commong nodes between two treescor_common_nodes
Cophenetic correlation between two treescor_cophenetic cor_cophenetic.default cor_cophenetic.dendlist
Correlation of FM_index for some kcor_FM_index
Correlation matrix between a list of trees.cor.dendlist
Counts the number of terminal nodes (merging 0 nodes!)count_terminal_nodes
Cut a dendrogram - and run a function on the outputcut_lower_fun dendextend_cut_lower_fun
Cut a Tree (Dendrogram/hclust/phylo) into Groups of Datacutree cutree.agnes cutree.default cutree.dendrogram cutree.diana cutree.hclust cutree.phylo
cutree for dendrogram (by 1 height only!)cutree_1h.dendrogram
cutree for dendrogram (by 1 k value only!)cutree_1k.dendrogram
Plots two trees side by side, highlighting edges unique to each tree in red.dend_diff dend_diff.dendlist dend_diff.dendrogram
Finds a "good" dendrogram for a distdend_expend find_dend
Access to dendextend_optionsdendextend_options
Creating a dendlist object from several dendrogramsdendlist plot.dendlist
Tries to run DendSer on a dendrogramDendSer.dendrogram
Turns a dist object to a "long" tabledist_long
Topological Distances Between Two dendrogramsdist.dendlist
Finds distinct edges in one tree compared to anotherdistinct_edges
Duplicate a leaf X timesduplicate_leaf
Measures entanglement between two treesentanglement entanglement.dendlist entanglement.dendrogram entanglement.hclust entanglement.phylo
Turns a factor into a numberfac2num
Search for the sub-dendrogram structure composed of selected labelsfind_dendrogram
Find the (estimated) number of clusters for a dendrogram using average silhouette widthfind_k plot.find_k
Fix members attr in a dendrogramfix_members_attr.dendrogram
Flatten the branches of a dendrogram's rootflatten.dendrogram
Flip leavesflip_leaves
Calculating Fowlkes-Mallows IndexFM_index
Calculating Fowlkes-Mallows Index under H0FM_index_permutation
Calculating Fowlkes-Mallows index in RFM_index_R
Get height attributes from a dendrogramget_branches_heights
Get height attributes from a dendrogram's childrenget_childrens_heights
Get/set attributes of dendrogram's leavesget_leaves_attr
Get an attribute of the branches of a dendrogram's leavesget_leaves_branches_attr
Get the colors of the branches of a dendrogram's leavesget_leaves_branches_col
Get edgePar of dendrogram's leavesget_leaves_edgePar
Get nodePar of dendrogram's leavesget_leaves_nodePar
Get attributes of dendrogram's nodesget_nodes_attr
Get the x-y coordinates of a dendrogram's nodesget_nodes_xy
get attributes from the dendrogram's root(!) branchesget_root_branches_attr
Extract a list of _k_ subdendrograms from a given dendrogram objectget_subdendrograms
Creates dendrogram plot using ggplot.as.ggdend as.ggdend.dendrogram ggdend ggplot.dendrogram ggplot.ggdend prepare.ggdend print.ggdend
Hang dendrogram leaveshang.dendrogram
Does a dendrogram has an edgePar/nodePar component?has_component_in_attribute has_edgePar has_nodePar
Which height will result in which k for a dendrogramdendextend_heights_per_k.dendrogram heights_per_k.dendrogram
Highlight a dendrogram's branches heights via color and line-widthhighlight_branches highlight_branches_col highlight_branches_lwd
Highlight distint edges in a tree (compared to another one)highlight_distinct_edges highlight_distinct_edges.dendlist highlight_distinct_edges.dendrogram
Identify Clusters in a Dendrogram (not hclust)identify.dendrogram
Intersect treesintersect_trees
Checks if the value is and empty list()is_null_list
Is the object of some classis.dendlist is.dendrogram is.dist is.hclust is.phylo is_some_class
Check if numbers are naturalis.natural.number
Microarray gene expression dataset from Khan et al., 2001. Subset of 306 genes.khan
Retrieve/assign cex to the labels of a dendrogramlabels_cex labels_cex<-
Retrieve/assign colors to the labels of a dendrogramlabels_col labels_colors labels_colors<-
"label" assignment operatorlabels.hclust labels.phylo labels<- labels<-.default labels<-.dendrogram labels<-.hclust labels<-.phylo
Ladderize a Treeladderize ladderize.dendlist ladderize.dendrogram ladderize.phylo
Return the leaf Colors of a dendrogramleaf_Colors leaf_colors
Find lowest common branch were the two items are sharedlowest_common_branch
Adjust the order of one dendrogram based on another (using labels)match_order_by_labels
Adjust the order of one dendrogram based on another (using order)match_order_dendrogram_by_old_order
Find minimum/maximum depth of a dendrogrammax_depth min_depth
Last Observation Carried Forwardna_locf
Counts the number of leaves in a treenleaves nleaves.default nleaves.dendlist nleaves.dendrogram nleaves.hclust nleaves.phylo
Counts the number of nodes (Vertices) in a treennodes nnodes.default nnodes.dendrogram nnodes.hclust nnodes.phylo
Find which nodes satisfies a conditionnoded_with_condition
order.dendrogram<- assignment operatororder.dendrogram<-
Ordering of the Leaves in a hclust Dendrogramorder.hclust
A list with labels for each subtree (edge)partition_leaves
Plotting a left-tip-adjusted horizontal dendrogramplot_horiz.dendrogram
Prunes a tree (using leaves' labels)prune prune.default prune.dendrogram prune.hclust prune.phylo prune.rpart
Prune trees to their common subtreesprune_common_subtrees.dendlist
Trims one leaf from a dendrogramprune_leaf
Get Pvclust Edges Informationpvclust_edges
The significant branches in a dendrogram, based on a pvclust objectpvclust_show_signif
Significance gradient of branches in a dendrogram (via pvclust)pvclust_show_signif_gradient
Draw Rectangles Around a Dendrogram's Clusters with High/Low P-valuespvrect2
Raise the height of a dendrogram treeraise.dendrogram
Rank branches' heightsrank_branches
Fix rank of leaves order values in a dendrogramrank_order.dendrogram
Rank a vector based on clustersrank_values_with_clusters
Draw Rectangles Around a Dendrogram's Clustersrect.dendrogram
Reindexing a pruned dendrogramreindex_dend
Remove all edgePar values from a dendrogram's branchesremove_branches_edgePar
Remove all nodePar values from a dendrogram's leavesremove_leaves_nodePar
Remove all nodePar values from a dendrogram's nodesremove_nodes_nodePar
recursivly apply a function on a listrllply
Rotate a tree objectrev.hclust rotate rotate.default rotate.dendrogram rotate.hclust rotate.phylo sort.dendlist sort.dendrogram sort.hclust
Rotates dend based on DendSerrotate_DendSer
Sample a treesample.dendrogram
Rotates a dendrogram based on a seriation of a distance matrixseriate_dendrogram
Set (/update) features to a dendrogramset set.data.table set.dendlist set.dendrogram
Set/place new labels in a dendrogramplace_labels set_labels
Random rotation of treesshuffle shuffle.default shuffle.dendlist shuffle.dendrogram shuffle.hclust shuffle.phylo
Sorts two clusters vector by their namessort_2_clusters_vectors
Sorts a distance matrix by rows and columns namessort_dist_mat
Sort the values level in a vectorsort_levels_values
Tanglegram plotdendbackback tanglegram tanglegram.default tanglegram.dendlist tanglegram.dendrogram tanglegram.hclust tanglegram.phylo
Creates completely blank theme in ggplottheme_dendro
unbranch treesunbranch unbranch.default unbranch.dendrogram unbranch.hclust unbranch.phylo
unclass an entire dendrogram treeunclass_dend
untangle dendrogramsuntangle untangle.default untangle.dendlist untangle.dendrogram untangle_labels
Tries to run DendSer on a dendrogramuntangle_DendSer
Untangle - random searchuntangle_random_search
Stepwise untangle one tree compared to anotheruntangle_step_rotate_1side
Stepwise untangle two trees one at a timeuntangle_step_rotate_2side
Stepwise untangle two trees at the same timeuntangle_step_rotate_both_side
Which node is a leaf?which_leaf
Which node id is common to a group of labelswhich_node