Running ‘testthat.R’ [52s/81s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(baggr)
  Loading required package: Rcpp
  This is baggr v0.1; see vignette('baggr') for tutorial, ?baggr for basic help.
  For execution on a local, multicore CPU with excess RAM call:
  options(mc.cores = parallel::detectCores())
  > 
  > test_check("baggr")
  ── 1. Error: Basic operations on full data model (@test_full.R#21)  ────────────
  is_3d_array(x) is not TRUE
  Backtrace:
    1. testthat::expect_is(plot(bg_p), "gg")
    5. baggr:::plot.baggr(bg_p)
    8. base::lapply(...)
    9. baggr:::FUN(X[[i]], ...)
   10. bayesplot::mcmc_intervals(...)
   11. bayesplot::mcmc_intervals_data(...)
   12. bayesplot:::prepare_mcmc_array(x, pars, regex_pars, transformations)
   16. bayesplot:::parameter_names.array(x)
   17. base::stopifnot(is_3d_array(x))
  
  
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |=========                                                             |  12%
    |                                                                            
    |==================                                                    |  25%
    |                                                                            
    |==========================                                            |  38%
    |                                                                            
    |===================================                                   |  50%
    |                                                                            
    |============================================                          |  62%
    |                                                                            
    |====================================================                  |  75%
    |                                                                            
    |=============================================================         |  88%
    |                                                                            
    |======================================================================| 100%
  ── 2. Error: Plotting works (@test_mutau.R#117)  ───────────────────────────────
  is_3d_array(x) is not TRUE
  Backtrace:
    1. testthat::expect_is(plot(bg5_n), "gg")
    5. baggr:::plot.baggr(bg5_n)
    8. base::lapply(...)
    9. baggr:::FUN(X[[i]], ...)
   10. bayesplot::mcmc_intervals(...)
   11. bayesplot::mcmc_intervals_data(...)
   12. bayesplot:::prepare_mcmc_array(x, pars, regex_pars, transformations)
   16. bayesplot:::parameter_names.array(x)
   17. base::stopifnot(is_3d_array(x))
  
  ── 3. Error: Plotting works (@test_rubin.R#127)  ───────────────────────────────
  is_3d_array(x) is not TRUE
  Backtrace:
    1. testthat::expect_is(plot(bg5_n), "gg")
    5. baggr:::plot.baggr(bg5_n)
    8. base::lapply(...)
    9. baggr:::FUN(X[[i]], ...)
   10. bayesplot::mcmc_intervals(...)
   11. bayesplot::mcmc_intervals_data(...)
   12. bayesplot:::prepare_mcmc_array(x, pars, regex_pars, transformations)
   16. bayesplot:::parameter_names.array(x)
   17. base::stopifnot(is_3d_array(x))
  
  Error in check_columns(data, outcome, group, treatment) : 
    There's no column 'outcome' in data
  Error in check_columns(data, outcome, group, treatment) : 
    There's no column 'outcome' in data
  Error in check_columns(data, outcome, group, treatment) : 
    There's no column 'outcome' in data
  Error in inherits(data, "data.frame") : 
    argument "data" is missing, with no default
  Error in inherits(data, "data.frame") : 
    argument "data" is missing, with no default
  Error in inherits(data, "data.frame") : 
    argument "data" is missing, with no default
  Mean treatment effects:
                2.5%     mean    97.5%
  none            NA       NA       NA
  partial -3.1319406 7.930976 22.45006
  full    -0.9683914 7.005215 15.79063
  
  SD for treatment effects:
               2.5%     mean    97.5%
  none           NA       NA       NA
  partial 0.1909223 6.968879 21.47322
  full    0.0000000 0.000000  0.00000
  Mean treatment effects:
                 2.5%      mean     97.5%
  Prior      -4.39228  6.273492 14.848238
  Posterior -15.57339 -6.415441  2.569021
  
  SD for treatment effects:
                 2.5%      mean    97.5%
  Prior     0.3405443  6.449744 21.35436
  Posterior 3.1791321 54.576639 99.28158
  Mean treatment effects:
                2.5%        mean     97.5%
  Model 1 -0.8002114 0.020777940 0.9329718
  Model 2         NA          NA        NA
  Model 3 -0.7790988 0.001807372 0.7124479
  
  SD for treatment effects:
                2.5%      mean    97.5%
  Model 1 0.02469815 0.5663172 1.549852
  Model 2         NA        NA       NA
  Model 3 0.00000000 0.0000000 0.000000
  ── 4. Error: baggr_compare basic cases work with Rubin (@test_rubin.R#223)  ────
  is_3d_array(x) is not TRUE
  Backtrace:
    1. baggr::baggr_compare(bg5_p, bg5_n, bg5_f, arrange = "grid")
    2. base::lapply(models, baggr_plot, style = style, order = FALSE)
    3. baggr:::FUN(X[[i]], ...)
    4. base::lapply(...)
    5. baggr:::FUN(X[[i]], ...)
    6. bayesplot::mcmc_areas(...)
    7. bayesplot::mcmc_areas_data(...)
    8. bayesplot::mcmc_intervals_data(...)
    9. bayesplot:::prepare_mcmc_array(x, pars, regex_pars, transformations)
   13. bayesplot:::parameter_names.array(x)
   14. base::stopifnot(is_3d_array(x))
  
  Error in convert_inputs(data, model, quantiles = quantiles, outcome = outcome,  : 
    Data provided is of type Aggregate (effects only) and the model requires Aggregate (control and effects)
  
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |=========                                                             |  12%
    |                                                                            
    |==================                                                    |  25%
    |                                                                            
    |==========================                                            |  38%
    |                                                                            
    |===================================                                   |  50%
    |                                                                            
    |============================================                          |  62%
    |                                                                            
    |====================================================                  |  75%
    |                                                                            
    |=============================================================         |  88%
    |                                                                            
    |======================================================================| 100%
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 207 | SKIPPED: 1 | WARNINGS: 0 | FAILED: 4 ]
  1. Error: Basic operations on full data model (@test_full.R#21) 
  2. Error: Plotting works (@test_mutau.R#117) 
  3. Error: Plotting works (@test_rubin.R#127) 
  4. Error: baggr_compare basic cases work with Rubin (@test_rubin.R#223) 
  
  Error: testthat unit tests failed
  Execution halted