aggregate_products: Aggregate by product

View source: R/aggregation.R

aggregate_productsR Documentation

Aggregate by product

Description

This function aggregates PSUT matrices by energy carrier (product) according to an aggregation map. Aggregated matrices replace original matrices on output.

Usage

aggregate_products(
  .psut_df,
  matrices_to_aggregate = c("R", "U", "V", "Y"),
  aggregation_map = PFUWorkflow::product_aggregation_map,
  countries,
  country = IEATools::iea_cols$country
)

Arguments

.psut_df

A data frame with PSUT matrices in columns.

matrices_to_aggregate

A list of the matrices to aggregate according to aggregation_map. Default is c("R", "U", "V", "Y").

aggregation_map

A description of the aggregation to be performed. See matsbyname::aggregate_byname() for a description of its format. Default is PFUWorkflow::product_aggregation_map.

countries

The countries to be analyzed.

country

The name of the country column in .psut_df.

Value

A data frame of aggregated products.


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