Visualizes the within-group sum of squares of every calculated kmeans clustering.

plotScreeplot(
  object,
  variable_set,
  phase = NULL,
  method_kmeans = NULL,
  k = 2:10,
  clr = "steelblue",
  display_cols = TRUE,
  display_line = TRUE,
  display_points = TRUE
)

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_kmeans

Character vector (or value see details for more.) Denotes the algorithms of interest. Defaults to 'Hartigan-Wong'.

Use validKmeansMethods() to obtain all valid input options.

clr

Character value. Denotes the color of the columns.

display_cols

Logical value. If set to TRUE columns are used additionally to display the results.

display_line

Logical value. If set to TRUE a line is used additionally to display the results.

display_points

Logical value. If set to TRUE points are used additionally to display the results.

Value

A ggplot.

Details

If method_kmeans is a vector a subplot for all valid input values is displayed via ggplot2::facet_wrap().