plotDendrogram: Plot dendrograms

plotDendrogramR Documentation

Plot dendrograms

Description

Plots a dendrogram with either ggplot or base plot.

Usage

plotDendrogram(object, ...)

## S4 method for signature 'Clustering'
plotDendrogram(
  object,
  methods_dist = "euclidean",
  methods_aggl = "ward.D",
  k = NULL,
  h = NULL,
  type = "rectangle",
  facet_with = "grid",
  direction = "bt",
  branch_color = "black",
  branch_size = 1,
  display_labels = FALSE,
  labels_angle = 90,
  labels_hjust = 0,
  labels_nudge = 0.01,
  labels_size = 3,
  labels_vjust = 0.5,
  display_legend = TRUE,
  display_title = FALSE,
  clrp = "milo",
  clrp_adjust = NULL,
  simple = FALSE,
  nrow = NULL,
  ncol = NULL,
  ...
)

## S4 method for signature 'Analysis'
plotDendrogram(
  object,
  methods_dist = "euclidean",
  methods_aggl = "ward.D",
  k = NULL,
  h = NULL,
  type = "rectangle",
  facet_with = "grid",
  direction = "bt",
  branch_color = "black",
  branch_size = 1,
  display_labels = FALSE,
  labels_angle = 90,
  labels_hjust = 0,
  labels_nudge = 0.01,
  labels_size = 3,
  labels_vjust = 0.5,
  display_legend = TRUE,
  display_title = FALSE,
  clrp = "milo",
  clrp_adjust = NULL,
  simple = FALSE,
  nrow = NULL,
  ncol = NULL,
  ...
)

Arguments

object

Any object for whose class a method has been defined.

k

Numeric value. Denotes the number of clusters. Must be bigger than 1. Must not be bigger than the number of observations of the data set.

h

Numeric value. Denotes the height at which the dendrogram is cut.

type

Character value. Indicates the shape of the dendrogram. Input 'rectangle' will draw rectangular lines, while 'triangle' will draw triangular lines.

facet_with

Character value. Either 'grid' or 'wrap'. Specifies the function with which the plot-facetting is created. If the number of input combinations for methods_dist and methods_aggl length 2 or bigger and facet_with = 'wrap' ggplot2::facet_wrap() is used. Else ggplot2::facet_grid() is used.

display_labels

Lgoical value. Indicates if labels are displayed.

display_legend, display_title

Logical values. Indicate if legend or 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.

simple

Logical value. If TRUE, the dendrogram is plotted with base::plot(). This is way quicker but does not allow for ggplot2 specific adjustments.

Value

A ggplot or a base plot.


kueckelj/confuns documentation built on July 4, 2024, 4:53 p.m.