Learn R Programming

exvatools (version 0.9.0)

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

Value

Block transposed version of df with elements transposed.

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

See Also

bkt().

Examples

Run this code
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]

Run the code above in your browser using DataLab