bkdiag: Diagonalize blocks of a block matrix

View source: R/matrix_blocks.R

bkdiagR Documentation

Diagonalize blocks of a block matrix

Description

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.

Usage

bkdiag(df)

Arguments

df

A block matrix with named rows and columns.

Value

Matrix df with blocks of dimension NxN diagonalized.

Examples

wio <- make_wio("wiodtest", quiet = TRUE)
# Normal version of matrix Y
wio$Y
# Diagonal version (show first columns only)
bkdiag(wio$Y)[, 1:6]

exvatools documentation built on Sept. 17, 2024, 1:07 a.m.