| create_calc_config | R Documentation |
Defines calculation settings for generating shock values, including variable mapping,
timeline sequence, and exclusion criteria. Used as input for both
shock_calculate and shock_calculate_uniform.
create_calc_config(
column_mapping = NULL,
timeline = 1,
exclude_self_trade = FALSE,
exclusion_values = NULL
)
column_mapping |
Optional named vector mapping initial and target columns
(e.g., |
timeline |
Numeric or character range defining simulation periods.
|
exclude_self_trade |
Logical; if TRUE, removes intra-region records. Default is FALSE. |
exclusion_values |
Optional named list of elements to exclude from calculation. |
Controls column alignment between initial and target datasets
Supports numeric or range-based timeline definitions (e.g., "1-10")
Excludes self-trade or specified region/sector pairs if configured
Provides core metadata for shock calculation functions
A list containing:
column_mapping: variable mapping between datasets
timeline: expanded numeric sequence of simulation periods
exclude_self_trade: logical flag
exclusion_values: exclusion list by dimension
Pattawee Puangchit
create_initial_config, create_target_config,
shock_calculate, shock_calculate_uniform
# Example: Define Calculation Configuration
calc <- create_calc_config(
column_mapping = c(COMM = "COMM", REG = "REG", REG.1 = "REG.1"),
timeline = "1-5",
exclude_self_trade = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.