get_rows_by_names: Get Row of Matrix by Rowname

Description Usage Arguments Value Examples

Description

This function provides a pipe friendly way of retrieving rows of a matrix by rownames.

Usage

1
get_rows_by_names(in.mat, in.row.names)

Arguments

in.mat

The input matrix

in.row.names

The row names to subset by

Value

A subset of the matrix

Examples

1
2
mat <- matrix(1:20, 5, 4, dimnames = list(LETTERS[1:5], NULL))
get_rows_by_names(mat, c("A", "D", "E"))

tinyheero/tinyutils documentation built on May 31, 2019, 3:36 p.m.