Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

blkdiag

Block diagonal matrix


Description

Block diagonal concatenation of input arguments.

Usage

blkdiag(...)

Arguments

...

Variable number of matrices M1, M2, ....

Value

A block diagonal matrix diag(M1, M2, ...).

Author(s)

Giovanni M. Marchetti

See Also

Examples

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))

ggm

Graphical Markov Models with Mixed Graphs

v2.5
GPL-2
Authors
Giovanni M. Marchetti, Mathias Drton, Kayvan Sadeghi
Initial release
2020-02-014

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.