Creates a list object of class wio
containing the typical
international input-output matrices in a standardized format, as well as a
list of code names (countries, sectors and demand components) and a list
of dimensions (number of countries, sectors and demand components), using
custom data.
make_custom_wio(
df,
g_names,
n_names = NULL,
fd_names = NULL,
year = NULL,
quiet = FALSE
)
A wio
object of wiotype = "custom"
.
A data frame or matrix containing data for intermediate inputs and final demand.
A string vector with names of countries.
A string vector with names of sectors. If missing, sectors
will be S01
, S02
, etc. If just one sector, it will be named
TOTAL
.
A string vector with names of final demand components.
If missing, demand components will be FD1
, FD2
, etc. If just one,
it will be named FD
.
Integer. If missing, the current year will be used.
Boolean, if TRUE
, the function will produce a silent output.
make_custom_wio()
creates a wio
from custom input-output data provided
as a single matrix of dimension GxN x GxFD
, i.e., the matrix Z
of
intermediate inputs (dimension GxN x GxN
) bound with the matrix Yfd
of
final demand (dimension GxN x GxFD
). The matrices of total output X
and
value added VA
will be automatically generated, so should not be
included. Data must be exclusively numeric.
A string vector with the names of countries is required. Number of countries will be calculated from this vector. Names for sectors and final demand components can be provided or will otherwise be automatically generated. All names must be composed of alphabetic characters (no special characters are allowed).
df <- as.data.frame(matrix(c(19:36), nrow = 3))
wio <- make_custom_wio(df, g_names = c("C01", "C02", "C03"))
Run the code above in your browser using DataLab