cluster_id {ccfindR} | R Documentation

## Assign cells into clusters

### Description

Use factorization results in an object to assign cells into clusters.

### Usage

    cluster_id(object, rank = 2)

### Arguments

`object` | Object of class `scNMFSet`
`rank` | Rank value whose factor matrices are to be used for assignment.

### Value

Vector of length equal to the number of cells containing cluster ID numbers of each cell.

### Examples

    set.seed(1)
    x <- simulate_whx(nrow=50,ncol=100,rank=5)
    s <- scNMFSet(count=x$x)
    s <- vb_factorize(s,ranks=seq(2,8),nrun=5)
    cid <- cluster_id(s, rank=5)
    table(cid)

[Package ccfindR version 1.4.2 Index]