3  col - label specification

This is a way to specify the column name for source data along with the axis label

col_label("CL//Clearance (L)")
[1] "CL"            "Clearance (L)"

When only the column is given, then the column name will be used for the column title:

col_label("WT")
[1] "WT" "WT"

3.1 Generate using the yspec package

You can also pull col//title data from a yspec object. Load the yspec package and generate an example data specification object

library(yspec)
spec <- ys_help$spec()

Typically, you’ll want to select a subset of columns and then call axis_col_labs()

spec %>% 
  ys_select(WT, AGE, BMI) %>% 
  axis_col_labs()
                WT                AGE                BMI 
 "WT//weight (kg)" "AGE//age (years)" "BMI//BMI (m2/kg)"