| apply_default_labs | R Documentation |
Resolves title/subtitle/caption/tag labels for plot from (in
increasing precedence):
the xpose.xtras.default_labs R option (a named list, see examples),
defaults set on xpdb via set_default_labs(), when xpdb is
supplied (a rendered plot does not retain enough of its source
xpdb to look this up automatically – pass it explicitly),
values passed directly via ....
By default only labels not already set on the plot are filled in; set
overwrite = TRUE to replace existing labels too.
print.xpose_plot() calls this automatically
whenever xpose.xtras.auto_apply is enabled (the default; see
set_xtras_options()), but apply_default_labs() itself is a
standalone function that doesn't depend on that print method existing,
so it works the same regardless of whether that method survives issue
#36's eventual removal.
apply_default_labs(plot, ..., xpdb = NULL, overwrite = FALSE)
plot |
< |
... |
< |
xpdb |
< |
overwrite |
< |
plot, with resolved labels applied
set_xtras_options() for the full list of xpose.xtras.*
session options, and get_xtras_option() to check which tier
(option/xpdb) is currently dominant for a given xpdb.
options(xpose.xtras.default_labs = list(caption = "Draft -- do not distribute"))
p <- xpose::dv_vs_ipred(xpose::xpdb_ex_pk)
apply_default_labs(p)
options(xpose.xtras.default_labs = NULL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.