Skip to contents

This function stacks chopped data frames with dplyr::bind_rows().

Usage

stack_chopped_ECCs(
  psut,
  chop_R = NULL,
  chop_Y = NULL,
  chopped_mat = PFUAggPipeline::aggregation_df_cols$chopped_mat,
  chopped_var = PFUAggPipeline::aggregation_df_cols$chopped_var,
  Y_matname = Recca::psut_cols$Y,
  R_matname = Recca::psut_cols$R,
  product_sector = PFUAggPipeline::aggregation_df_cols$product_sector,
  none = PFUAggPipeline::agg_metadata$none
)

Arguments

psut, chop_Y, chop_R

Data frames to be stacked.

chopped_mat, chopped_var

Names of columns that tell the matrix that has been chopped (chop_mat) and the column that contains the the row or column name used for this chop.

R_matname, Y_matname

The names of R and Y matrices to be added to the chopped_var column of the data frame. Defaults are taken from Recca::psut_cols.

product_sector

The name of the data frame column that contains the variable that has been chopped.

none

The string for no chopping. Used with PSUT_Re_all_Gr_all. Default is PFUAggPipeline::agg_metadata$none.

Value

A row-bound version of PSUT_Re_all_Gr_all, PSUT_Re_all_Gr_all_Chop_Y, and PSUT_Re_all_Gr_all_Chop_R.