powered by
blkdiag(...)
M1, M2, ...
diag(M1, M2, ...)
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))
Run the code above in your browser using DataLab