Running examples in 'WVPlots-Ex.R' failed
The error most likely occurred in:

> ### Name: ScatterHist
> ### Title: Plot a scatter plot with marginals.
> ### Aliases: ScatterHist
> 
> ### ** Examples
> 
> 
> if (requireNamespace('data.table', quietly = TRUE)) {
+ 	# don't multi-thread during CRAN checks
+ 		data.table::setDTthreads(1)
+ }
> 
> set.seed(34903490)
> x = rnorm(50)
> y = 0.5*x^2 + 2*x + rnorm(length(x))
> frm = data.frame(x=x,y=y)
> WVPlots::ScatterHist(frm, "x", "y",
+   title= "Example Fit",
+   smoothmethod = "gam",
+   contour = TRUE)
Error in `ggplot2::geom_density2d()`:
! Problem while computing stat.
ℹ Error occurred in the 3rd layer.
Caused by error in `compute_layer()`:
! The package "MASS" is required for calculating 2D density.
Backtrace:
     ▆
  1. ├─WVPlots::ScatterHist(...)
  2. │ └─WVPlots:::designYLabelPadFunction(...)
  3. │   └─WVPlots:::getYLabs(p1)
  4. │     ├─ggplot2::ggplot_build(p)
  5. │     └─ggplot2 (local) `ggplot_build.ggplot2::ggplot`(p)
  6. │       └─ggplot2:::by_layer(...)
  7. │         ├─rlang::try_fetch(...)
  8. │         │ ├─base::tryCatch(...)
  9. │         │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
 10. │         │ │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
 11. │         │ │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
 12. │         │ └─base::withCallingHandlers(...)
 13. │         └─ggplot2 (local) f(l = layers[[i]], d = data[[i]])
 14. │           └─l$compute_statistic(d, layout)
 15. │             └─ggplot2 (local) compute_statistic(..., self = self)
 16. │               └─self$stat$compute_layer(data, self$computed_stat_params, layout)
 17. │                 └─ggplot2 (local) compute_layer(..., self = self)
 18. │                   └─rlang::check_installed("MASS", reason = "for calculating 2D density.")
 19. │                     └─base::stop(cnd)
 20. └─rlang (local) `<fn>`(`<rlb_r___>`)
 21.   └─handlers[[1L]](cnd)
 22.     └─cli::cli_abort(...)
 23.       └─rlang::abort(...)
Execution halted