Create a block diagonal matrix
Create a block diagonal matrix
bdiagMatrix(mlist, fill = 0)
mlist |
a list of matrices |
fill |
value to fill the non-diagnoal elements |
a block diagonal matrix
bdiag
in Matrix
m1 <- bdiagMatrix(list(matrix(1:4, 2), diag(3))) m2 <- bdiagMatrix(list(matrix(1:4, 2), diag(3)),fill = NA)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.