get_xtras_option: Inspect which 'xpose.xtras' option value is dominant

View source: R/xtras_options.R

get_xtras_optionR Documentation

Inspect which xpose.xtras option value is dominant

Description

For the two "two-tier" options – default_labs and default_watermark, which can be set both as a session-wide R option (via set_xtras_options()) and per-xpdb (via set_default_labs() / set_default_watermark()) – reports the value at each tier and which one is dominant, i.e. would currently be used by apply_default_labs() / add_watermark() absent any argument passed directly to those functions (which always takes precedence over both tiers).

The other options recognized by set_xtras_options() (save_dir, save_width, save_height, gg_theme, xp_theme) have no xpdb-level tier to compare against (see the Details in set_xtras_options()), so for those xpdb is always NULL and dominant is "option" or "neither".

Usage

get_xtras_option(name, xpdb = NULL)

Arguments

name

<character> One of the option names recognized by set_xtras_options()

xpdb

<xpose_data> or <xp_xtras> object to check for an xpdb-level value (optional; only consulted for default_labs/default_watermark)

Value

a list with elements option (the getOption() value), xpdb (the xpdb-level value, or NULL), and dominant (one of "option", "xpdb", or "neither")

Examples

options(xpose.xtras.default_labs = list(caption = "session default"))
xpdb_x2 <- set_default_labs(xpdb_x, caption = "model-specific")
get_xtras_option("default_labs", xpdb_x2)
options(xpose.xtras.default_labs = NULL)

xpose.xtras documentation built on Sept. 1, 2026, 5:08 p.m.