find_cell_indices: Find indices of cells that satisfy a predicate

Description Usage Arguments Details Value

Description

Find indices of cells that satisfy a predicate

Usage

1
find_cell_indices(mat, margin, predicate, ...)

Arguments

mat

Matrix

margin

Whether to apply predicate to rows or to columns (1 = rows, 2 = columns)

predicate

A function that takes a vector (a row or a column of mat) and returns a logical vector of the same length

...

Passed on to predicate

Details

Note that predicate can use information on all elements in a row (column) to decide whether a particular element of the row (column) satisfies the predicate or not.

Value

A two-column character matrix that can be used as index to mat to extract elements that satisfy predicate.


cbhelmholtz/metaboliteqc documentation built on May 13, 2019, 2:03 p.m.