subset_cpp {scGPS} | R Documentation

## Subset a matrix

### Description

Subset a matrix

### Usage

    subset_cpp(m1in, rowidx_in, colidx_in)

### Arguments

`m1in` | an R matrix (expression matrix)
`rowidx_in` | a numeric vector of rows to keep
`colidx_in` | a numeric vector of columns to keep

### Value

a subsetted matrix

### Examples

    mat_test <-matrix(rnbinom(1000000,mu=0.01, size=10),nrow=100)
    subset_mat <- subset_cpp(mat_test, rowidx_in=c(1:10), colidx_in=c(100:500))
    dim(subset_mat)

[Package scGPS version 1.2.0 Index]