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()
.
get_dim_info(dim_info)
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.
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.
Pattawee Puangchit
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.
get_var_structure
, compare_var_structure