import_element: Import IOM data

View source: R/import_iom.R

import_elementR Documentation

Import IOM data

Description

Import data from a input-output matrix (IOM) from Excel format.

Usage

import_element(file, sheet, range, col_names = FALSE, row_names = FALSE)

Arguments

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.

Value

A (matrix).

Examples

# 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]

fio documentation built on April 11, 2025, 6:11 p.m.