View source: R/matrix_blocks.R
bkdiag | R Documentation |
Diagonalize each block of a block matrix, so sectors of origin become also
sectors of destination. Blocks of dimension NxN
will remain
NxN
, but diagonalized, and blocks of dimensions Nx1
will
be expanded to NxN
and then diagonalized.
bkdiag(df)
df |
A block matrix with named rows and columns. |
Matrix df
with blocks of dimension NxN
diagonalized.
wio <- make_wio("wiodtest", quiet = TRUE)
# Normal version of matrix Y
wio$Y
# Diagonal version (show first columns only)
bkdiag(wio$Y)[, 1:6]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.