create_target_config: Create Target Value Configuration

View source: R/shock_cal.R

create_target_configR Documentation

Create Target Value Configuration

Description

Defines the configuration for loading the target dataset, which represents post-adjustment or comparative rate values. Supports multiple file formats.

Usage

create_target_config(
  path = NULL,
  type = NULL,
  header = NULL,
  value_col = "Value"
)

Arguments

path

Optional path to the target data file.

type

Optional file type for the target dataset ("har", "sl4", "csv", or "xlsx").

header

Optional header name within the HAR or SL4 file to extract.

value_col

Column name containing numeric target values. Default is "Value".

Details

  • Supports HAR, SL4, CSV, and XLSX file formats

  • Can also represent a uniform numeric target value when no file path is provided

  • Used in combination with create_initial_config for shock computation

Value

A list containing:

  • path: file path to target data

  • type: file format (lowercase)

  • header: header name in HAR/SL4 file

  • value_col: column name for target values

Author(s)

Pattawee Puangchit

See Also

create_initial_config, create_calc_config, shock_calculate, shock_calculate_uniform

Examples

# Example: Define Target Configuration
target <- create_target_config(
  path   = "D:/Data/taxrates_2019.har",
  type   = "har",
  header = "rTMS"
)

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