Check for Between-Level Patterns in Top Tables
check_between_level_pattern.Rd
This function checks if any of the elements within a list of top tables contain element names that match the specified between-level pattern.
Value
A list with two elements:
- between_levels
A logical value indicating whether any element names match the between-level pattern.
- index_with_pattern
The index of the first element in `top_tables` where all names match the between-level pattern, or NA if no match is found.
Details
The function iterates over each element in `top_tables`. For each element that is a list, it checks if all names within that inner list match the pattern `".+_vs_.+"`. If a match is found, the function sets `between_levels` to TRUE and records the index of the matching element. The search stops at the first match.