load_harx {HARplus}R Documentation

Load and Process HAR Files with Header Selection

Description

Reads a GEMPACK HAR file and extracts structured data while maintaining compatibility with standard HAR formats. Provides flexibility in naming conventions and header selection.

Usage

load_harx(
  file_path,
  coefAsname = FALSE,
  lowercase = FALSE,
  select_header = NULL
)

Arguments

file_path

Character. The file path to the HAR file.

coefAsname

Logical. If TRUE, replaces four-letter headers with coefficient names when available. Default is FALSE.

lowercase

Logical. If TRUE, converts all variable names to lowercase. Default is FALSE.

select_header

Character vector. Specific headers to read; if NULL, all headers are read. Example: select_header = c("A", "E1").

Details

Value

A structured list containing:

Author(s)

Pattawee Puangchit

See Also

load_sl4x, get_data_by_var, get_data_by_dims

Examples

# Path to example files
har_path <- system.file("extdata", "TAR10-WEL.har", package = "HARplus")

# Basic loading
har_data <- load_harx(har_path)

# Load with coefficient names
har_data_coef <- load_harx(har_path, coefAsname = TRUE)

# Load with lowercase names
har_data_lower <- load_harx(har_path, lowercase = TRUE)

# Load specific headers
har_selected <- load_harx(har_path, select_header = c("A", "E1"))

# Load with multiple options
har_combined <- load_harx(har_path,
                         coefAsname = TRUE,
                         lowercase = TRUE,
                         select_header = c("A", "E1"))


[Package HARplus version 1.0.1 Index]