Learn R Programming

Seurat (version 2.1.0)

SubsetRow: Return a subset of rows for a matrix or data frame

Description

Return a subset of rows for a matrix or data frame

Usage

SubsetRow(data, code, invert = FALSE)

Arguments

data

Matrix or data frame with row names

code

Pattern for matching within row names

invert

Invert the search?

Value

Returns a subset of data. If invert = TRUE, returns data where rownames do not contain code, otherwise returns data where rownames contain code

Examples

Run this code
# NOT RUN {
cd_genes <- SubsetRow(data = pbmc_small@raw.data, code = 'CD')
head(as.matrix(cd_genes)[, 1:4])

# }

Run the code above in your browser using DataLab