Running examples in ‘bayesplot-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: MCMC-scatterplots
> ### Title: Scatterplots of MCMC draws
> ### Aliases: MCMC-scatterplots mcmc_scatter mcmc_hex mcmc_pairs
> ###   scatter_style_np pairs_style_np pairs_condition
> 
> ### ** Examples
> 
> library("ggplot2")
> 
> # some parameter draws to use for demonstration
> x <- example_mcmc_draws(params = 6)
> dimnames(x)
$Iteration
NULL

$Chain
[1] "chain:1" "chain:2" "chain:3" "chain:4"

$Parameter
[1] "alpha"   "sigma"   "beta[1]" "beta[2]" "beta[3]" "beta[4]"

> 
> # scatterplot of alpha vs log(sigma)
> color_scheme_set("teal")
> (p <- mcmc_scatter(x, pars = c("alpha", "sigma"),
+                   transform = list(sigma = "log")))
> p +
+   labs(
+     title = "Insert your own headline-grabbing title",
+     subtitle = "with a provocative subtitle",
+     caption = "and a controversial caption",
+     x = expression(alpha),
+     y = expression(log(sigma))
+    )
> 
> # add ellipse
> p + stat_ellipse(level = 0.9, color = "gray20", size = 1)
Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
ℹ Please use `linewidth` instead.
Error in `stat_ellipse()`:
! Problem while computing stat.
ℹ Error occurred in the 2nd layer.
Caused by error in `setup_params()`:
! The package "MASS" is required for calculating ellipses with `type =
  "t"`.
Backtrace:
     ▆
  1. ├─base (local) `<fn>`(x)
  2. ├─ggplot2 (local) `print.ggplot2::ggplot`(x)
  3. │ ├─ggplot2::ggplot_build(x)
  4. │ └─ggplot2 (local) `ggplot_build.ggplot2::ggplot`(x)
  5. │   └─ggplot2:::by_layer(...)
  6. │     ├─rlang::try_fetch(...)
  7. │     │ ├─base::tryCatch(...)
  8. │     │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
  9. │     │ │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
 10. │     │ │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
 11. │     │ └─base::withCallingHandlers(...)
 12. │     └─ggplot2 (local) f(l = layers[[i]], d = data[[i]])
 13. │       └─l$compute_statistic(d, layout)
 14. │         └─ggplot2 (local) compute_statistic(..., self = self)
 15. │           └─self$stat$setup_params(data, self$stat_params)
 16. │             └─ggplot2 (local) setup_params(...)
 17. │               └─rlang::check_installed("MASS", "for calculating ellipses with `type = \"t\"`.")
 18. │                 └─base::stop(cnd)
 19. └─rlang (local) `<fn>`(`<rlb_r___>`)
 20.   └─handlers[[1L]](cnd)
 21.     └─cli::cli_abort(...)
 22.       └─rlang::abort(...)
Execution halted