Description Usage Arguments Details Note Author(s) Examples
View source: R/sfcr_matrix_display.R
Print matrix to screen
1 | sfcr_matrix_display(matrix, which = "tfm")
|
matrix |
A balance sheet or transactions-flow matrix |
which |
A character string for the matrix. Is it a balance-sheet or
a transactions-flow matrix? here are two options:
|
This function takes a matrix as input and generate a kableExtra
table with math symbols displayed in latex style.
This function converts the math expressions used to build the sfcr_matrix
into a latex format, but cannot add modifications to it. The user is
invited to explore the source code and the kableExtra
package in order to
personalize his/her own matrices.
João Macalós
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # Balance-sheet matrix
bs_insout <- sfcr_matrix(
columns = c("Households", "Firms", "Government", "Central bank", "Banks", "Sum"),
codes = c("h", "f", "g", "cb", "b", "s"),
r1 = c("Inventories", f = "+INV", s = "+INV"),
r2 = c("HPM", h = "+Hhd", cb = "-Hs", b = "+Hbd"),
r3 = c("Advances", cb = "+As", b = "-Ad"),
r4 = c("Checking deposits", h = "+M1h", b = "-M1s"),
r5 = c("Time deposits", h = "+M2h", b = "-M2s"),
r6 = c("Bills", h = "+Bhh", g = "-Bs", cb = "+Bcb", b = "+Bbd"),
r7 = c("Bonds", h = "+BLh * pbl", g = "-BLs * pbl"),
r8 = c("Loans", f = "-Ld", b = "+Ls"),
r9 = c("Balance", h = "-V", f = 0, g = "+GD", cb = 0, b = 0, s = "-INV")
)
sfcr_matrix_display(bs_insout, "bs")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.