blkdiag | R Documentation |
Block diagonal concatenation of input arguments.
blkdiag(...)
... |
Variable number of matrices |
A block diagonal matrix diag(M1, M2, ...)
.
Giovanni M. Marchetti
diag
X <- c(1,1,2,2); Z <- c(10, 20, 30, 40); A <- factor(c(1,2,2,2))
blkdiag(model.matrix(~X+Z), model.matrix(~A))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.