Convenience wrapper around base options() for the xpose.xtras.*
family of options recognized by this package. Prefixes are added
automatically and names are validated against the list below, so e.g.
set_xtras_options(save_dir = "figures") is equivalent to (but safer
against typos than) options(xpose.xtras.save_dir = "figures").
Current values can be read back with regular getOption() (e.g.
getOption("xpose.xtras.save_dir")), or with get_xtras_option() for
default_labs/default_watermark, which also considers any
xpdb-level default.
Arguments
- ...
<
dynamic-dots> One or more ofdefault_labs,default_watermark,save_dir,save_width,save_height,save_fun,gg_theme,xp_theme, given asname = value
Value
the previous values of the options that were set, invisibly
(see options())
Details
Recognized options (all unset, i.e. NULL, by default, except
auto_apply which defaults to TRUE):
auto_applyWhether print.xpose_plot() and
ggsave_xp()automatically apply configureddefault_labs/default_watermark(labels always; a watermark only ifdefault_watermarkis actually set at some tier – there's no unprompted default watermark). Defaults toTRUE, but is a no-op untildefault_labs/default_watermarkare themselves configured, so leaving it at its default has no visible effect on its own; set it toFALSEto opt out of the auto-apply behavior everywhere at once (or passapply_labs/apply_watermarkto a specificggsave_xp()call to opt out just there).print.xpose_plot()only ever sees the session-wide option tier (not anxpdb-level one) for the same reason noted underdefault_labsbelow.default_labsNamed list of default
title/subtitle/caption/tagtemplates (may contain@keywordplaceholders, seexpose::parse_title()). Used byapply_default_labs()(and by extensionggsave_xp()) as the lowest-precedence source for any label a plot doesn't already have – xpdb-level defaults (seeset_default_labs()) and arguments passed directly toapply_default_labs()both take precedence over this option.default_watermarkNamed list of default
add_watermark()arguments (any oflabel/colour/alpha/size/angle/fontface). Used byadd_watermark()as the lowest-precedence source – xpdb-level defaults (seeset_default_watermark()) and arguments passed directly toadd_watermark()both take precedence over this option.default_plotsA list of plot specs (see plot.xpose_data()) used whenever
plotsisn't supplied directly to plot.xpose_data(). Unlikedefault_labs/default_watermark, this is resolved as a whole (not merged key by key) – xpdb-level defaults (seeset_default_plots()) take precedence over this option, and aplotsargument passed directly takes precedence over both.save_dir,save_width,save_heightDefaults for the
path/width/heightarguments ofggsave_xp(), used whenever those arguments aren't supplied explicitly.save_funDefault save function for
ggsave_xp()(itself defaulting toggplot2::ggsave()when this is unset), for swapping in a drop-in alternative such asreportifyr::ggsave_with_metadata()project-wide instead of passingsave_funto everyggsave_xp()call.gg_theme,xp_themeDefault
ggplot2theme /xposexp_theme(seexpose::update_themes()) applied to anxpose_dataobject the first time it's converted viaas_xpdb_x(), so a project-wide look can be set once per session instead of callingxpose::update_themes()on everyxpdbindividually. Has no effect onxpdbs that are alreadyxp_xtrasobjects.
See also
get_xtras_option() to inspect which tier is currently
dominant for a two-tier option; apply_default_labs(),
add_watermark(), ggsave_xp(), and as_xpdb_x(), which consume
these options.
