get_var_structure {HARplus}R Documentation

Get Variable Structure Summary from SL4 and HAR Objects

Description

Generates a summary of the variables within one or more SL4 or HAR objects, listing their dimension sizes, structures, and optionally, column and observation counts.

Usage

get_var_structure(variables = NULL, ..., include_col_size = FALSE)

Arguments

variables

Character vector. Variable names to summarize. Use NULL or "ALL" to summarize all variables.

...

One or more SL4 or HAR objects created using load_sl4x() or load_harx().

include_col_size

Logical. If TRUE, includes column and observation counts. Default is FALSE.

Details

Value

A named list, where each element contains a data frame with:

Author(s)

Pattawee Puangchit

See Also

get_dim_patterns, get_dim_elements

Examples

# Import data sample:
sl4_data <- load_sl4x(system.file("extdata", "TAR10.sl4", package = "HARplus"))
sl4_data1 <- load_sl4x(system.file("extdata", "SUBT10.sl4", package = "HARplus"))

# Get summary for all variables in a single dataset
get_var_structure(data_obj = sl4_data)

# Get summary for specific variables
get_var_structure(c("gdp", "trade"), sl4_data)

# Include column and observation counts
get_var_structure("ALL", sl4_data, include_col_size = TRUE)

# Compare structures across multiple datasets
get_var_structure("ALL", sl4_data, sl4_data1)

# Include column and observation counts across multiple datasets
get_var_structure("ALL", sl4_data, sl4_data1, include_col_size = TRUE)


[Package HARplus version 1.0.1 Index]