get_cols_by_names: Get Columns of Matrix by Column Name

Description Usage Arguments Value Examples

Description

This function provides a pipe friendly way of retrieving columns of a matrix by column anmes

Usage

1
get_cols_by_names(in.mat, in.col.names)

Arguments

in.mat

The input matrix

in.col.names

The column names to subset by

Value

A subset of the matrix

Examples

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

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