blkdiag.RdBuild a block diagonal matrix.
blkdiag(...)Generate a block diagonal matrix from A, B, C, .... All the arguments must be numeric and non-empty matrices.
a numeric matrix
Vectors as input have to be converted to matrices before. Note that
as.matrix(v) with v a vector will generate a column vector;
use matrix(v, nrow=1) if a row vector is intended.