slingClusterLabels {slingshot} | R Documentation

## Extract cluster labels used by Slingshot

### Description

Extract the cluster labels used by `slingshot`.

### Usage

    slingClusterLabels(x)

    ## S4 method for signature 'SlingshotDataSet'
    slingClusterLabels(x)

    ## S4 method for signature 'SingleCellExperiment'
    slingClusterLabels(x)

### Arguments

`x` | an object containing `slingshot` output.

### Value

a vector of cluster labels or a matrix of cluster assignment weights.

### Methods (by class)

- `SlingshotDataSet`: returns the cluster labels stored in a `SlingshotDataSet` object.

- `SingleCellExperiment`: returns the cluster labels used by `slingshot` in a `SingleCellExperiment` object.

### Examples

    data("slingshotExample")
    rd <- slingshotExample$rd
    cl <- slingshotExample$cl
    sds <- getLineages(rd, cl)
    slingClusterLabels(sds)

[Package slingshot version 1.5.1 Index]