View source: R/make_custom_wio.R
make_custom_wio | R Documentation |
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
)
df |
A data frame or matrix containing data for intermediate inputs and final demand. |
g_names |
A string vector with names of countries. |
n_names |
A string vector with names of sectors. If missing, sectors
will be |
fd_names |
A string vector with names of final demand components.
If missing, demand components will be |
year |
Integer. If missing, the current year will be used. |
quiet |
Boolean, if |
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).
A wio
object of wiotype = "custom"
.
df <- as.data.frame(matrix(c(19:36), nrow = 3))
wio <- make_custom_wio(df, g_names = c("C01", "C02", "C03"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.