Pass in a named list of gg objects and apply pm_relabel().
a named list of gg objects.
a character vector of list names to relabel.
a named list of label data; names correspond to columns in the
data used to make the plots; may also be a yspec object.
another object like spec containing of label data to override
names found in spec.
a regular expression for selecting names to be used for at.
additional arguments passed to pm_relabel().
Note that all plots in the list need to be named. When re is provided it
takes precedence over at.
data <- pmplots_data_obs()
spec <- list(DV = "Observed (ng/mL)", PRED = "Population predicted (ng/mL)")
x <- list(p1 = dv_pred(data), p2 = dv_ipred(data))
x <- relabel_at(x, at = "p1", spec = spec)
x$p1
#> `geom_smooth()` using formula = 'y ~ x'
x <- relabel_at(x, re = "p", spec = spec)
x$p2
#> `geom_smooth()` using formula = 'y ~ x'
#> `geom_smooth()` using formula = 'y ~ x'