label_get() looks variable names up in a named vector of labels and falls
back to the raw name. label_expand() builds labels of derived variables
from a dictionary of root names: the visit suffix is removed first, then
the prefixes one by one, so that DELTA_LOG_NFL becomes "Delta log(NfL)"
and BIN_IL6_V0 becomes "IL-6 (high) V0".
Arguments
- var, vars
Character vector of variable names.
- labels
Named character vector
name -> label, orNULL.- base_labels
Named character vector of labels of the root names.
- visit_map
Named vector
suffix -> text appended to the label.- prefix_map
Named vector
prefix -> sprintf() format. TheBINentry, whenNA, is replaced bybin_format.- bin_format
Format of the categorised variables (
BIN_prefix), e.g."%s (high)"for a median split or"%s (tertiles)".- bin_format_root
Optional named vector
root -> formatoverridingbin_formatfor some roots (e.g. fromlodestar::cut_label_formats()).
