print.badp_plots: Print a Collection of Plots

View source: R/badp_plots.R

print.badp_plotsR Documentation

Print a Collection of Plots

Description

Print method for the plot collections returned by model_sizes, model_pmp, coef_hist and posterior_dens.

Usage

## S3 method for class 'badp_plots'
print(x, which = NULL, ...)

Arguments

x

An object of class badp_plots.

which

Optional name or position of a single plot to draw instead of the default figure. A name must be one of names(x) and a position an index between 1 and length(x).

...

Additional arguments (currently unused).

Details

A bare list of ggplot2 objects is auto-printed one element at a time, so on an interactive device each plot replaces the one before it and only the last remains visible. These functions therefore return a classed collection, and this method draws a single figure: the combined plot when the collection provides one, and otherwise every plot arranged together with wrap_plots. Individual plots are still reached by name or position and printed on their own.

Value

Invisibly returns x.

See Also

model_sizes, model_pmp, coef_hist, posterior_dens

Examples


data(full_model_space)
results <- bma(full_model_space)

sizes <- model_sizes(results)
sizes                       # one combined figure
print(sizes, which = "binomial")
names(sizes)



badp documentation built on Sept. 15, 2026, 1:08 a.m.