Find metadata columns
meta_cols.Rd
Determines which columns are metadata columns in an IEA data frame
by subtracting year columns and cols_to_exclude
from all columns names in .df
.
Usage
meta_cols(
.df,
not_meta = IEATools::iea_cols$e_dot,
years_to_keep = NULL,
return_names = FALSE
)
Arguments
- .df
A (possibly) non-tidy data frame with years spread to the right in columns.
- not_meta
A vector of column names or position integers identifying columns to not include in the return value. Default is
IEATools::iea_cols$e_dot
.- years_to_keep
A vector of years to retain. Default is
NULL
, which eliminates all year columns.- return_names
A boolean which tells whether names are returned instead of column indices. Default is
FALSE
.