import_element | R Documentation |
Import data from a input-output matrix (IOM) from Excel format.
import_element(file, sheet, range, col_names = FALSE, row_names = FALSE)
file |
Path to the Excel file. |
sheet |
Name of the sheet in the Excel file. |
range |
Range of cells in the Excel file. |
col_names |
Range of cells with column names. |
row_names |
Range of cells with row names. |
A (matrix
).
# Excel file with IOM data
path_to_xlsx <- system.file("extdata", "iom/br/2020.xlsx", package = "fio")
# Import IOM data
intermediate_transactions = import_element(
file = path_to_xlsx,
sheet = "iom",
range = "D6:BB56",
col_names = "D4:BB4",
row_names = "B6:B56"
)
# Show the first 6 rows and 6 columns
intermediate_transactions[1:6, 1:6]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.