create_initial_config: Create Initial Value Configuration

View source: R/shock_cal.R

create_initial_configR Documentation

Create Initial Value Configuration

Description

Defines the configuration for loading the initial dataset, including path, format, variable header, and value column name. Used as input for shock_calculate and shock_calculate_uniform.

Usage

create_initial_config(path, format, header, value_col = "Value")

Arguments

path

Path to the initial data file.

format

File format of the initial dataset. Must be "har" or "sl4".

header

Header name within the HAR or SL4 file to extract.

value_col

Name of the column containing numeric values. Default is "Value".

Details

  • Supports HAR and SL4 file formats

  • Specifies the header name to extract from the dataset

  • Allows custom naming for the value column (Value by default)

Value

A list containing:

  • path: input file path

  • format: file format ("har" or "sl4")

  • header: target header name

  • value_col: column name for numeric values

Author(s)

Pattawee Puangchit

See Also

create_target_config, create_calc_config, shock_calculate, shock_calculate_uniform

Examples

# Example: Define Initial Configuration
initial <- create_initial_config(
  path   = "D:/Data/taxrates_2017.har",
  format = "har",
  header = "rTMS"
)

HARplus documentation built on Nov. 5, 2025, 6:34 p.m.