row_subset: Keep rows whose names match a pattern

View source: R/row_subset.R

row_subsetR Documentation

Keep rows whose names match a pattern

Description

row_subset() is a wrapper around m[, str_detect(rownames(m), pattern)]

Usage

row_subset(m, pattern, negate = FALSE)

Arguments

m

Input matrix or data frame.

pattern

Pattern to look for. The default interpretation is a regular expression, as described in stringi::stringi-search-regex. Control options with 'regex()'.

negate

If 'TRUE', return non-matching rows.

Details

Vectorised over rownames('m') and 'pattern'

Value

A matrix.


jlaffy/scalop documentation built on March 24, 2024, 9 a.m.