bdiagMatrix: Create a block diagonal matrix

Description Usage Arguments Value See Also Examples

View source: R/ExportedFuncs.R

Description

Create a block diagonal matrix

Usage

1
bdiagMatrix(mlist, fill = 0)

Arguments

mlist

a list of matrices

fill

value to fill the non-diagnoal elements

Value

a block diagonal matrix

See Also

bdiag in Matrix

Examples

1
2
m1 <- bdiagMatrix(list(matrix(1:4, 2), diag(3)))
m2 <- bdiagMatrix(list(matrix(1:4, 2), diag(3)),fill = NA)

Wenchao-Ma/GDINA documentation built on May 4, 2018, 3:24 p.m.