Skip to contents

Stores a plot spec on xpdb that plot.xpose_data() uses instead of the package's built-in default whenever plots isn't supplied directly to that call. Unlike set_default_labs()/set_default_watermark(), this replaces the xpdb-level default wholesale rather than merging with it: entries in a plot spec aren't addressable by a stable key (the same plot function can legitimately appear more than once), so there is no sensible key-by-key merge to perform.

Usage

set_default_plots(xpdb, plots)

Arguments

xpdb

<xpose_data> or <xp_xtras> object

plots

A list of plot specs – see plot.xpose_data() for the accepted forms

Value

xp_xtras object

See also

set_xtras_options() for the session-option equivalent (xpose.xtras.default_plots), and get_xtras_option() to check which one is currently dominant.

Examples

xpdb2 <- set_default_plots(xpdb_x, list(~ xpose::dv_vs_ipred(.x), ~ xpose::eta_distrib(.x)))
names(plot(xpdb2, quiet = TRUE))
#> Using data from $prob no.1
#> Filtering data by EVID == 0
#> Using data from $prob no.1
#> Removing duplicated rows based on: ID
#> Tidying data by ID, SEX, MED1, MED2, DOSE ... and 23 more variables
#> [1] "xpose::dv_vs_ipred" "xpose::eta_distrib"