process_pattern {HARplus} | R Documentation |
Extract and Process Pattern-Matched Variables (Internal)
Description
A helper function that extracts and processes variables matching a specified pattern
within an SL4 or HAR data object. Used internally in get_data_by_dims()
.
Usage
process_pattern(pattern, data_obj, exp_name, pattern_mix = FALSE)
Arguments
pattern |
Character. The pattern to match against dimension structures. |
data_obj |
An SL4 or HAR object containing dimension information and data. |
exp_name |
Character. The experiment name assigned to the extracted data. |
pattern_mix |
Logical. If |
Details
Searches for variables whose dimension structures match the given pattern.
Supports flexible pattern matching when
pattern_mix = TRUE
, allowing dimension order to vary.Extracted data is converted into a tidy format, preserving dimension structures.
Standardizes
"Subtotal"
column naming for consistency across datasets.Ensures only non-empty extracted variables are retained.
Value
A data frame containing processed data for the matching pattern, or NULL
if no matches are found.
Author(s)
Pattawee Puangchit
See Also
get_original_pattern
, pattern_match
, get_data_by_dims