get_dim_info: Extract and Organize Dimension Metadata (Internal)

View source: R/utils.R

get_dim_infoR Documentation

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)

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.

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.

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.

Author(s)

Pattawee Puangchit

See Also

get_var_structure, compare_var_structure


HARplus documentation built on April 4, 2025, 4:14 a.m.