Aggregate by product
aggregate_products.Rd
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 isc("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 isPFUWorkflow::product_aggregation_map
.- countries
The countries to be analyzed.
- country
The name of the country column in
.psut_df
.