View source: R/data_functions.R
make_iea_psut | R Documentation |
Converts tidy IEA data to PSUT matrices in a way that is amenable to drake subtargets.
Internally, IEATools::prep_psut()
does the conversion to matrices.
make_iea_psut(
SpecifiedIEAData,
countries,
matrix_class = c("matrix", "Matrix"),
country = IEATools::iea_cols$country
)
SpecifiedIEAData |
A data frame that has already been specified via |
countries |
The countries you want to convert to PSUT matrices. |
matrix_class |
The type of matrix to be created. One of "matrix" (the base class) or "Matrix" (for sparse matrices). |
country |
See |
A matsindf
-style data frame.
IEATools::sample_iea_data_path() %>%
IEATools::load_tidy_iea_df() %>%
make_balanced(countries = c("GHA", "ZAF")) %>%
specify(countries = c("GHA", "ZAF")) %>%
make_iea_psut(countries = c("GHA", "ZAF"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.