blockDiag: Block Diagonal Matrix

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/utility.R

Description

Form a block diagonal matrix from the given blocks.

Usage

1

Arguments

...

numeric matrices

Details

This function is sometimes useful for constructing a design matrix for a disconnected two-color microarray experiment in conjunction with modelMatrix.

Value

A block diagonal matrix with dimensions equal to the sum of the input dimensions

Author(s)

Gordon Smyth

See Also

modelMatrix

Examples

1
2
3
a <- matrix(1,3,2)
b <- matrix(2,2,2)
blockDiag(a,b)

Example output

  1 2 1 2
1 1 1 0 0
2 1 1 0 0
3 1 1 0 0
1 0 0 2 2
2 0 0 2 2

limma documentation built on Nov. 8, 2020, 8:28 p.m.