Skip to contents

Matrices can be grouped by products and industries. This function stacks those data frames with appropriate metadata columns using dplyr::bind_rows().

Usage

stack_group_aggregations(
  despecified_df,
  Gr_Pr = NULL,
  Gr_In = NULL,
  Gr_PrIn = NULL,
  product_aggregation = PFUAggPipeline::aggregation_df_cols$product_aggregation,
  industry_aggregation = PFUAggPipeline::aggregation_df_cols$industry_aggregation,
  specified = PFUAggPipeline::aggregation_df_cols$specified,
  despecified = PFUAggPipeline::aggregation_df_cols$despecified,
  ungrouped = PFUAggPipeline::aggregation_df_cols$ungrouped,
  grouped = PFUAggPipeline::aggregation_df_cols$grouped
)

Arguments

despecified_df

A data frame in which products and industries are both despecified and not yet grouped.

Gr_Pr

The data frame with grouped products. Default is NULL.

Gr_In

The data frame with grouped industries. Default is NULL.

Gr_PrIn

The data frame with both grouped products and industries. Default is NULL.

product_aggregation

The product aggregation column. Default is PFUAggPipeline::aggregation_df_cols$product_aggregation.

industry_aggregation

The industry aggregation column. Default is PFUAggPipeline::aggregation_df_cols$industry_aggregation.

specified

A string that indicates a product or industry is specified. Default is PFUAggPipeline::aggregation_df_cols$specified.

despecified

A string that indicates a product or industry is despecified Default is PFUAggPipeline::aggregation_df_cols$despecified.

ungrouped

A string that indicates a product or industry is grouped. Default is PFUAggPipeline::aggregation_df_cols$ungrouped.

grouped

A string that indicates a product or industry is grouped. Default is PFUAggPipeline::aggregation_df_cols$grouped.

Value

A stacked set of data frames with different product and industry groupings