subset_cpp: Subset a matrix

Description Usage Arguments Value Examples

View source: R/RcppExports.R

Description

Subset a matrix

Usage

1
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

1
2
3
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)

scGPS documentation built on Nov. 8, 2020, 5:22 p.m.