bktt: Block transpose matrix with transposed blocks

View source: R/matrix_blocks.R

bkttR Documentation

Block transpose matrix with transposed blocks

Description

Block transpose matrix and then transpose each block. block(s,r) is transformed into block(r,s) and then internally transposed. This is not equivalent to directly transpose the matrix.

Usage

bktt(df)

Arguments

df

A square block matrix with named rows and columns. Names of countries and sectors are automatically identified. Unlike bkt(), bktt() can only be used with square block matrices with NxN blocks (with row and column names in the form AUS_01T02, AUS_05, etc.)

Value

Block transposed version of df with elements transposed.

See Also

bkt().

Examples

wio <- make_wio("wiodtest", quiet = TRUE)
# Block-transpose Z and transpose blocks (show first elements only)
bktt(wio$Z)[1:6, 1:6]
# Note that directly transposing Z produces a different result:
t(wio$Z)[1:6, 1:6]

exvatools documentation built on May 29, 2024, 6:46 a.m.