bdiagMat: Block-Diagonal Expansion of a List of Matrices

Description Usage Arguments Value Author(s) See Also Examples

View source: R/bdiagMat.R

Description

The function bdiagMat builds a single matrix with block-diagonal from a list of matrices.

Usage

1

Arguments

x

a list of matrices, or a single matrix.

Value

A matrix with block-diagonal form if x is a list, or otherwise x itself if a matrix.

Author(s)

Antonio Gasparrini <antonio.gasparrini@lshtm.ac.uk>

See Also

See functions bldiag in package metafor.

Examples

1
2
3
# GENERATE A LIST OF MATRICES, AND CREATE THE BLOCK-DIAGONAL MATRIX
(matlist <- list(matrix(1:4,2), matrix(1:8,2)))
bdiagMat(matlist)

mixmeta documentation built on Oct. 16, 2021, 5:09 p.m.