Find variables matching a pattern across multiple datasets
Source:R/get_vars_by_pattern.R
get_vars_by_pattern.RdThis function searches for specific variable names (columns) across multiple data frames in the global environment that match a certain naming pattern.
Arguments
- data_pattern
A string containing a regular expression to match the names of the datasets in the global environment. For more information on supported regular expressions, see R's regex documentation.
- var_pattern
A string containing a regular expression to match the variable names within those datasets.