runKmeans {flowSpy} | R Documentation

## runKmeans

### Description

Perform k-means clustering on a data matrix.

### Usage

    runKmeans(
      object,
      k = 25,
      iter.max = 10,
      nstart = 1,
      algorithm = c("Hartigan-Wong", "Lloyd", "Forgy", "MacQueen"),
      trace = FALSE,
      scale = FALSE,
      verbose = FALSE,
      ...
    )

### Arguments

`object` | an FSPY object
`k` | numeric. The number of clusters.
`iter.max` | numeric. The maximum number of iterations allowed.
`nstart` | numeric. If k is a number, how many random sets should be chosen.
`algorithm` | character. Type of algorithm that will be choosen to calculate kmeans. Four algoritms are provided: Hartigan-Wong, Lloyd, Forgy, MacQueen.
`trace` | logical or integer number.
`scale` | logical. Whether to use scaled data in kmeans.
`verbose` | logical. Whether to print calculation progress.
`...` | Parameters passing to `kmeans` function

### Value

an FSPY object with kmeans.id in meta.data

### See Also

`kmeans`

### Examples

    if (FALSE) {
    fspy <- runKmeans(fspy, k = 25, verbose = TRUE)
    }

[Package flowSpy version 1.0.4 Index]