powered by
The function bdiagMat builds a single matrix with block-diagonal from a list of matrices.
bdiagMat
bdiagMat(x)
A matrix with block-diagonal form if x is a list, or otherwise x itself if a matrix.
x
a list of matrices, or a single matrix.
Antonio Gasparrini <antonio.gasparrini@lshtm.ac.uk>
See functions bldiag in package metafor.
bldiag
# GENERATE A LIST OF MATRICES, AND CREATE THE BLOCK-DIAGONAL MATRIX (matlist <- list(matrix(1:4,2), matrix(1:8,2))) bdiagMat(matlist)
Run the code above in your browser using DataLab