- data_list
A named list of data frames to process.
- pivot_col
A named list specifying the column to pivot into a wide format for each dataset.
Each dataset can have only one pivot column. Example:
pivot_col = list(A = "COLUMN", E1 = "PRICES")
- total_column
Logical. If TRUE
, adds a "Total" column summing numeric values.
- export_table
Logical. If TRUE
, saves the output as an Excel file.
- separate_file
Logical. If TRUE
, saves each dataset as a separate Excel file.
- output_path
Character. Directory for saving Excel files when export_table = TRUE
.
- sheet_names
Optional named list for custom sheet names.
- include_units
Logical. If TRUE
, includes "Unit" as a grouping column if applicable.
- component_exclude
Optional character vector specifying pivoted values to exclude.
- group_by
A named list defining hierarchical grouping for each dataset. The order of columns
in each list determines the priority. Example:
group_by = list(A = list("Experiment", "REG"), E1 = list("Experiment", "REG", "COMM"))
- rename_cols
A named list for renaming columns across all datasets. Example:
rename_cols = list("REG" = "Region", "COMM" = "Commodities", "Experiment" = "Scenario")
- var_name_by_description
Logical. If TRUE
, replaces variable codes with descriptions when available.
- add_var_info
Logical. If TRUE
, appends variable codes in parentheses after descriptions.
- decimal
Numeric. Number of decimal places for rounding values.
- unit_select
Optional character. Specifies a unit to filter the dataset.
- separate_sheet_by
Optional column name to split sheets in Excel. If defined, each unique
value in the specified column gets its own sheet. Example: separate_sheet_by = "Scenario"
.
- subtotal_level
Logical. If TRUE
, includes all subtotal values; otherwise, keeps only TOTAL
rows.
- repeat_label
Logical. If TRUE
, repeats the first group column in exports for clarity.
- workbook_name
Character. Name of the Excel workbook (without extension).
- add_group_line
Logical. If TRUE
, adds a thin line after each group in the exported table.