Performs kmeans clustering for every combination of method_kmeans and k and saves the results in the cypro object.

computeKmeansCluster(
  object,
  variable_set,
  k,
  phase = NULL,
  method_kmeans = 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.

k

Numeric vector. For every value the kmeans cluster assignment is calculated via stats::kmeans().

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.

verbose

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

(Warning messages will always be printed.)

Value

An updated version of the input cypro-object.

Details

As this function iterates over all valid combinations of k and method_kmeans both inputs can be specified as vectors.