make_psut: Convert to PSUT matrices

View source: R/data_functions.R

make_psutR Documentation

Convert to PSUT matrices

Description

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.

Usage

make_psut(SpecifiedIEAData, countries, country = IEATools::iea_cols$country)

Arguments

SpecifiedIEAData

A data frame that has already been specified via specify().

countries

The countries you want to convert to PSUT matrices.

country

See IEATools::iea_cols.

Value

a matsindf-style data frame

Examples

IEATools::sample_iea_data_path() %>%
  IEATools::load_tidy_iea_df() %>%
  make_balanced(countries = c("GHA", "ZAF")) %>%
  specify(countries = c("GHA", "ZAF")) %>%
  make_psut(countries = c("GHA", "ZAF"))

MatthewHeun/SEAPSUTWorkflow documentation built on April 22, 2022, 2:21 p.m.