Learn R Programming

ggcorrheatmap (version 0.1.2)

prepare_dendrogram: Prepare dendrogram by transforming dendrogram segments.

Description

Prepare dendrogram by transforming dendrogram segments.

Usage

prepare_dendrogram(
  dendro_in,
  context = c("rows", "cols"),
  dend_side,
  dend_defaults,
  dend_params,
  full_plt,
  layout,
  x_long,
  annot_df,
  annot_side,
  annot_pos,
  annot_size
)

Value

Data frame with dendrogram segment and node parameters.

Arguments

dendro_in

Dendrogram object generated by some_matrix |> dist() |> hclust() |> as.dendrogram() |> dendextend::as.ggdend().

context

Dimension the dendrogram will be plotted against (rows or columns).

dend_side

String for dendrogram side.

dend_defaults

List with dendrogram default parameters.

dend_params

List with dendrogram parameters to overwrite defaults.

full_plt

Logical indicating if the whole heatmap is plotted or not.

layout

The heatmap layout (for reordering rows).

x_long

Data frame containing the values that will be plotted in the heatmap.

annot_df

Data frame containing annotations.

annot_side

Logical specifying which side the annotation will be drawn, analogous to 'dend_down' or 'dend_left' (use the one in the same dimension as the dendrogram).

annot_pos

Vector of the annotation positions along the opposite dimension.

annot_size

Size of annotation cells, specified in heatmap cells (1 being the size of one cell).