Learn R Programming

HARplus (version 1.0.1)

get_dim_info: Extract and Organize Dimension Metadata (Internal)

Description

A helper function that extracts and structures dimension-related metadata from a given dimension structure. Used internally in get_var_structure() and compare_var_structure().

Usage

get_dim_info(dim_info)

Value

A structured list containing:

  • dimension_string: The original dimension string.

  • dim_size: The number of dimensions.

  • data_shape: A formatted string representing the data shape (e.g., "10x20x30").

  • col_size: The product of all dimension sizes except the first, representing column count.

  • n_obs: The first dimension size, typically representing the number of observations.

Arguments

dim_info

A list containing dimension metadata, including:

  • dimension_string: A textual representation of dimensions (e.g., "REG*COMM*YEAR").

  • dimension_names: A character vector of dimension names.

  • dimension_sizes: A numeric vector indicating the size of each dimension.

Author

Pattawee Puangchit

Details

  • Retrieves structured metadata for variables in SL4 and HAR datasets.

  • Computes data shape and ensures consistency in dimension structures.

  • Helps determine observation counts and column sizes for variable summaries.

See Also

get_var_structure, compare_var_structure