Internal utility function to map a variable or column name to a more descriptive, human-readable label based on a lookup table.
The lookup table must contain two columns:
name_pattern – Regular expressions to match column names
name_substitute – Human-readable label returned when pattern matches
The function returns the first matching substitute label.
If no pattern matches, the input colname is returned unchanged.
This function is not exported and is intended for use inside the ume
package (e.g., for automatic axis labeling in plotting functions).
.f_label(colname, lookup = ume::nice_labels_dt)A character string: either the substitute label or the original
colname if no pattern matches.
Character string. Column name to be matched.
A data.table or data.frame with columns
name_pattern and name_substitute.
Lookup Pretty Labels for Column Names (Internal)