bkd: Get block diagonal matrix

View source: R/matrix_blocks.R

bkdR Documentation

Get block diagonal matrix

Description

Produces a block diagonal matrix version of block matrix, i.e., a matrix in which the diagonal blocks are non-zero and the off-diagonal blocks are zero

Usage

bkd(df)

Arguments

df

A block matrix with named rows and columns. Names of countries and sectors are automatically identified.

Value

Block diagonal version of the original matrix.

Examples

wio <- make_wio("wiodtest", quiet = TRUE)
# Block diagonal version of Y (coincides with Yd)
bkd(wio$Y)

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