interleaveMatricesByColumn: Combines two matrices by their columns

View source: R/util.R

interleaveMatricesByColumnR Documentation

Combines two matrices by their columns

Description

The matrices need to have the same dimensions and column names must be equal. The first matrix needs row names as well. This is used to merge, e.g. matrices for expression signal and present flag by sample.

Usage

interleaveMatricesByColumn(x, y, suffixes = c("[Signal]", "[Present]"))

Arguments

x

first matrix containing both row and column names.

y

second matrix containing the same column names as the first one.

suffixes

a character vector to append as suffixes to the colnames of the result.

Value

Returns the combined matrix.

Author(s)

Rehrauer, Hubert

Schmid, Peter

Examples

m1 = matrix(1:10,2)
m2 = matrix(11:20,2)
colnames(m1) = as.character(1:5)
rownames(m1) = c("a","b")
colnames(m2) = as.character(1:5)
interleaveMatricesByColumn(m1,m2)

uzh/ezRun documentation built on April 24, 2024, 4:01 p.m.