Plots the hierarchical tress agglomerated by agglomerateHierarchicalCluster().

plotDendrogram(
  object,
  variable_set,
  phase = NULL,
  method_dist = NULL,
  method_aggl = NULL,
  k = NULL,
  h = NULL,
  branch_size = 1,
  display_legend = TRUE,
  display_title = TRUE,
  clrp = "milo",
  clrp_adjust = NULL,
  ncol = NULL,
  nrow = NULL,
  verbose = NULL,
  ...
)

Arguments

object

A valid cypro object.

variable_set

Character value. Denotes the variable set of interest. Use getVariableSetNames() to obtain all names of currently stored variable sets in your object.

phase

Character or numeric. If character, the ordinal value referring to the phase of interest (e.g. 'first', 'second' etc.). referring to the phase of interest or 'all'. If numeric, the number referring to the phase.

If set to NULL takes the phase denoted as default with adjustDefault().

Ignored if the experiment design contains only one phase.

method_dist

Character vector (or value see details for more.) Denotes the distance method(s) of interest (e.g. 'euclidean' or 'manhattan').

Use validDistanceMethods() to obtain all valid input options.

method_aggl

Character vector (or value see details for more.) Denotes the agglomeration method(s) of interest according to which the existing distance matrices are agglomerated to hierarchical trees.

Use validAgglomerationMethods() to obtain all valid input options.

k

Numeric value or NULL. If numeric the branches are colored according to their cluster assignment whereby the number of clusters is equal to k.

h

Numeric value or NULL. If numeric the branches are colored according to their cluster assignment whereby the number of clusters is equal to the results of cutting the hierarchical tree at height h..

branch_size

Numeric value. Denotes the thickness of the branches.

display_legend

Logical value. If set to TRUE a legend is displayed.

display_title

Logical value. If set to TRUE an informative title is displayed.

clrp

Character value. Specifies the color palette to be used to represent groups of discrete variables. Run validColorPalettes() to obtain valid input options.

clrp_adjust

Named character vector or NULL. If character, it adjusts the color palette that is used to represent the groups. Names of the input vector must refer to the group and the respective named element denotes the color with which to represent the group.

ncol

Given to ggplot2::facet_wrap(). Affects the way the subplots are displayed.

nrow

Given to ggplot2::facet_wrap(). Affects the way the subplots are displayed.

verbose

Logical. If set to TRUE informative messages regarding the computational progress will be printed.

(Warning messages will always be printed.)

...

Additional arguments given to ggdendro::ggdendrogram().

Value

A ggplot.

Details

Iterates over all valid combinations of the method_* arguments and creates a dendrogram if the respective clustering results are found. nrow and ncol can be used to align the plots.