Calculate primary, final, and useful aggregates
calculate_pfu_aggregates.Rd
In addition to calculating primary, final, and useful aggregates,
this function removes matrix columns and adds a GrossNet
column to the data frame.
Usage
calculate_pfu_aggregates(
.agg_data,
countries,
years,
gross_net = Recca::efficiency_cols$gross_net,
R = "R",
U = "U",
U_feed = "U_feed",
U_eiou = "U_EIOU",
r_eiou = "r_EIOU",
V = "V",
Y = "Y",
S_units = "S_units",
gross = Recca::efficiency_cols$gross,
net = Recca::efficiency_cols$net,
last_stage = Recca::psut_cols$last_stage,
final = IEATools::all_stages$final,
useful = IEATools::all_stages$useful,
ex_p = Recca::aggregate_cols$aggregate_primary,
ex_f = IEATools::aggregate_cols$aggregate_final,
ex_u = IEATools::aggregate_cols$aggregate_useful,
ex_fd_gross = Recca::aggregate_cols$gross_aggregate_demand,
ex_fd_net = Recca::aggregate_cols$net_aggregate_demand,
ex_fd = Recca::aggregate_cols$aggregate_demand
)
Arguments
- .agg_data
Input data containing gross and net final demand aggregate columns.
- countries
The countries to work on.
- years
The years to work on.
- gross_net
The name of the column that identifies gross or net final demand aggregates. Default is
Recca::efficiency_cols$gross_net
.- R, U, U_feed, U_eiou, r_eiou, V, Y, S_units
Columns of matrices to be deleted.
- gross, net
Strings inserted into the
grossnet
column. SeeRecca::efficiency_cols
.- last_stage
The string name of a column containing last stages of energy conversion chains. Default is
Recca::psut_cols$last_stage
.- final, useful
String names of last stages. Defaults from
IEATools::all_stages
.- ex_p, ex_f, ex_u
Names for columns in
.agg_data
for primary, final, and useful aggregations.- ex_fd, ex_fd_gross, ex_fd_net
Names for columns of total, gross, and net final demand aggregates. Defaults from
Recca::aggregate_cols
.