tidyicio: Tidyicio

View source: R/tidyicio.R

tidyicioR Documentation

Tidyicio

Description

This function is a function of the input-output table from the OECD involving China and Mexico in the processing trade part, re-combined into the original China and Mexico in the corresponding components of the table. The main operations include: 1. Delete CHN and MEX from the official website's csv data 2. Merge CN1, CN2 as CHN; MX1, MX2 as MEX, and put CHN and MEX a right positions. 3. Merge tax subsidies into value added, and check if rows and columns correspond one to one.

Usage

tidyicio(icio, edition = 2021)

Arguments

icio

A rdata file from official websites

edition

'2022' 2022 denotes the version of ICIO issued by OECD in 2022. '2021' denotes the previous version of the former.

Value

A modified ICIO.

Examples

# load('/Users/yangnay/elements2/RawE/24_DataBase/投入产出表/OECD/1995_2020/oecdcsv.rdata')
# icio <- list()
# for (i in 1:length(oecdicio)) {
#  icio[[names(oecdicio)[i]]] <- tidyicio(oecdicio[[i]], edition = 2022)
#}
# oecdicio <- icio
# save(oecdicio, file = 'data-raw/icio2022.rdata')


common2016/MyFun documentation built on Sept. 23, 2024, 3:49 p.m.