load_sl4x {HARplus}R Documentation

Load and Process SL4 Files with Enhanced Options

Description

Reads an SL4 file and processes its structured data into an enhanced SL4 object. Extracts structured variable information, dimensions, and handles subtotal columns.

Usage

load_sl4x(file_path, lowercase = FALSE, select_header = NULL)

Arguments

file_path

Character. The full path to the SL4 file to be read.

lowercase

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

select_header

Character vector. Specific headers to extract; if NULL, all headers are read.

Details

Value

A structured list containing:

Author(s)

Pattawee Puangchit

See Also

load_harx, get_data_by_var, get_data_by_dims

Examples

# Path to example files
sl4_path <- system.file("extdata", "TAR10.sl4", package = "HARplus")

# Basic loading
sl4_data <- load_sl4x(sl4_path)

# Load with lowercase names
sl4_data_lower <- load_sl4x(sl4_path, lowercase = TRUE)

# Load specific headers
sl4_selected <- load_sl4x(sl4_path, select_header = c("qo", "qgdp"))


[Package HARplus version 1.0.1 Index]