View source: R/PrIn_aggregations.R
grouped_aggregations | R Documentation |
Aggregating to groups of rows or columns can be accomplished by an aggregation_map
.
Internally, this function calls Recca::grou_aggregates()
, so
arguments aggregation_map
, margin
, and pattern_type
control its behavior.
grouped_aggregations(
.psut_data,
countries,
years,
aggregation_map,
margin = list(c(1, 2)),
pattern_type = "exact",
R = Recca::psut_cols$R,
U = Recca::psut_cols$U,
V = Recca::psut_cols$V,
Y = Recca::psut_cols$Y,
r_eiou = Recca::psut_cols$r_eiou,
U_eiou = Recca::psut_cols$U_eiou,
U_feed = Recca::psut_cols$U_feed,
S_units = Recca::psut_cols$S_units,
R_aggregated_colname = paste0(Recca::psut_cols$R, aggregated_suffix),
U_aggregated_colname = paste0(Recca::psut_cols$U, aggregated_suffix),
V_aggregated_colname = paste0(Recca::psut_cols$V, aggregated_suffix),
Y_aggregated_colname = paste0(Recca::psut_cols$Y, aggregated_suffix),
r_eiou_aggregated_colname = paste0(Recca::psut_cols$r_eiou, aggregated_suffix),
U_eiou_aggregated_colname = paste0(Recca::psut_cols$U_eiou, aggregated_suffix),
U_feed_aggregated_colname = paste0(Recca::psut_cols$U_feed, aggregated_suffix),
S_units_aggregated_colname = paste0(Recca::psut_cols$S_units, aggregated_suffix),
aggregated_suffix = Recca::aggregate_cols$aggregated_suffix
)
.psut_data |
A data frame of PSUT matrices. |
countries |
The countries to be analyzed. |
years |
The years to be analyzed. |
aggregation_map |
A named list of rows or columns to be aggregated (or |
margin |
|
pattern_type |
See |
R, U, V, Y, r_eiou, U_eiou, U_feed, S_units |
The names of input columns in |
R_aggregated_colname, U_aggregated_colname, V_aggregated_colname, Y_aggregated_colname, r_eiou_aggregated_colname, U_eiou_aggregated_colname, U_feed_aggregated_colname, S_units_aggregated_colname |
The names of output aggregated columns. |
aggregated_suffix |
The suffix for columns of aggregated matrices.
Default is |
A version of .psut_data
with aggregated rows or columns.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.