runKNN {flowSpy} | R Documentation

## Calculate k-nearest neighbors of FSPY

### Description

Calculates and stores a k-nearest neighbor graph based on Euclidean distance with (KMKNN) algorithm using log-transformed signaling matrix of flow cytometry data. The base function are base on `findKNN`.

### Usage

    runKNN(
      object,
      given.mat = NULL,
      knn = 30,
      knn.replace = TRUE,
      verbose = FALSE,
      ...
    )

### Arguments

`object` | an FSPY object
`given.mat` | matrix. Given matrix to run knn
`knn` | numeric. Number of k-nearest neighbors.
`knn.replace` | logic. Whether to replace knn in FSPY object
`verbose` | logical. Whether to print calculation progress.
`...` | Parameters passing to `findKNN` function

### Value

An FSPY object with knn, knn.index and knn.distance information.

### See Also

`findKNN`

### Examples

    if (FALSE) {

    fspy <- runKNN(fspy)

    }

[Package flowSpy version 1.4.0 Index]