reduceM: Resize a matrix

Description Usage Arguments Value Author(s) Examples

View source: R/utils.R

Description

Resize a matrix to the number of rows commun to a vector.

Usage

1
reduceM(x, mat, threshold=0)

Arguments

x

Character or numeric vector.

mat

Matrix sharing rownames with the supplied vextor x.

threshold

Threshold upon column. Only the columns with a colSums above the threshold are kept.

Value

Resized matrix.

Author(s)

N. LeMeur

Examples

1
2
3
mat <- matrix(c(1:25), nrow = 5, ncol = 5, dimnames = list(c(LETTERS[1:5]), c(1:5)))
xx <- LETTERS[c(2, 4, 5)]
reduceM(xx, mat)

PCpheno documentation built on Nov. 8, 2020, 5:10 p.m.