if (interactive()) {
#load example mcmc.list
data(cjs)
# use current device
diag_plots(cjs, "B0")
# use a new device
diag_plots(cjs, "B0", ext_device = TRUE)
# always show diagnostic summaries
diag_plots(cjs, "B0", show_diags = "always")
# use a different layout (leaving it as "auto" is usually best)
diag_plots(cjs, c("sig", "b"), layout = "5x3")
# save diagnostics for all nodes to a pdf file
diag_plots(cjs, "", save = TRUE, file = "diags.pdf")
}
Run the code above in your browser using DataLab