states<- {CellTrails} | R Documentation

## SET states

### Description

Sets states to a `SingleCellExperiment` object

### Usage

    states(object) <- value

### Arguments

`object` | An object of class `SingleCellExperiment`
`value` | A numeric, character or factor vector

### Details

State information is added to a `SingleCellExperiment` object via `colData`. If the vector containing the cluster assignments is numeric, the prefix "S" is added and the vector is converted to type factor.

### Value

An updated object of class `SingleCellExperiment`

### Author(s)

Daniel C. Ellwanger

### See Also

colData

### Examples

    # Example data
    data(exSCE)

    # Assign clusters
    cl <- kmeans(logcounts(exSCE), centers=10)$cluster
    states(exSCE) <- cl

[Package CellTrails version 1.12.0 Index]