Learn R Programming

iotables (version 0.4.5)

supplementary_add: Add Supplementary Data

Description

Download the employment data for a country and arrange it to the 64x64 SIOTs. Currently works only with product x product tables.

Usage

supplementary_add(data_table, supplementary_data, supplementary_names = NULL)

Arguments

data_table

A SIOT, a use table, a supply table, or a margins table.

supplementary_data

Supplementary data to be added. It must be a data.frame or tibble with a key column containing the indicator's name, and the column names must match with the data_table. Can be a vector or a data frame of several rows.

supplementary_names

Optional names for the new supplementary rows. Defaults to NULL.

Value

A symmetric input-output table with supplementary data, of data.frame class. The column names are ordered, and the row names are in the first, auxiliary metadata column.

Examples

Run this code
# NOT RUN {
de_io <- iotable_get()
CO2 <- c( 0.2379, 0.5172, 0.0456, 0.1320, 0.0127, 0.0530)  
names ( CO2) <- c("agriculture_group", "industry_group","construction",
                  "trade_group","business_services_group","other_services_group") 
CO2 <- cbind ( 
  data.frame ( iotables_row = "CO2"),as.data.frame ( t(CO2)))
de_coeff <- input_coefficient_matrix_create ( iotable_get() )

supplementary_add ( de_io, CO2)
# }

Run the code above in your browser using DataLab