Running ‘testthat.R’ [109s/131s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This is necessary because some tests fail otherwise; see https://github.com/hadley/testthat/issues/144
  > Sys.setenv("R_TESTS" = "")
  > 
  > library(testthat)
  > library(tidybayes)
  NOTE: As of tidybayes version 1.0, several functions, arguments, and output column names
        have undergone significant name changes in order to adopt a unified naming scheme.
        See help('tidybayes-deprecated') for more information.
  
  > 
  > test_check("tidybayes")
  ── 1. Error: [add_]fitted_draws works on a simple rstanarm model (@test.fitted_d
  no applicable method for 'posterior_linpred' applied to an object of class "c('stanreg', 'glm', 'lm')"
  1: posterior_linpred(m_hp_wt, newdata = mtcars_tbl) %>% as.data.frame() %>% mutate(.chain = as.integer(NA), 
         .iteration = as.integer(NA), .draw = seq_len(n())) %>% gather(.row, .value, -.chain, 
         -.iteration, -.draw) %>% as_data_frame() at testthat/test.fitted_draws.R:38
  2: eval(lhs, parent, parent)
  3: eval(lhs, parent, parent)
  4: posterior_linpred(m_hp_wt, newdata = mtcars_tbl)
  
  ── 2. Error: [add_]fitted_draws works on an rstanarm model with grouped newdata 
  no applicable method for 'posterior_linpred' applied to an object of class "c('stanreg', 'glm', 'lm')"
  1: posterior_linpred(m_hp_wt, newdata = mtcars_tbl) %>% as.data.frame() %>% mutate(.chain = as.integer(NA), 
         .iteration = as.integer(NA), .draw = seq_len(n())) %>% gather(.row, .value, -.chain, 
         -.iteration, -.draw) %>% as_data_frame() at testthat/test.fitted_draws.R:70
  2: eval(lhs, parent, parent)
  3: eval(lhs, parent, parent)
  4: posterior_linpred(m_hp_wt, newdata = mtcars_tbl)
  
  ── 3. Failure: [add_]predicted_draws throws an error when re.form is called inst
  `m_hp_wt %>% fitted_draws(newdata = mtcars_tbl, re.form = NULL)` threw an error with unexpected message.
  Expected match: "`re.form.*.`re_formula`.*.See the documentation for additional details."
  Actual message: "The `rstanarm` package is needed for `fitted_draws` to support `stanreg` objects."
  
  ── 4. Failure: [add_]predicted_draws throws an error when re.form is called inst
  `m_hp_wt %>% add_fitted_draws(newdata = mtcars_tbl, re.form = NULL)` threw an error with unexpected message.
  Expected match: "`re.form.*.`re_formula`.*.See the documentation for additional details."
  Actual message: "The `rstanarm` package is needed for `fitted_draws` to support `stanreg` objects."
  
  ── 5. Failure: [add_]predicted_draws throws an error when transform is called in
  `m_hp_wt %>% fitted_draws(newdata = mtcars_tbl, transform = TRUE)` threw an error with unexpected message.
  Expected match: "`transform.*.`scale`.*.See the documentation for additional details."
  Actual message: "The `rstanarm` package is needed for `fitted_draws` to support `stanreg` objects."
  
  ── 6. Failure: [add_]predicted_draws throws an error when transform is called in
  `m_hp_wt %>% add_fitted_draws(newdata = mtcars_tbl, transform = TRUE)` threw an error with unexpected message.
  Expected match: "`transform.*.`scale`.*.See the documentation for additional details."
  Actual message: "The `rstanarm` package is needed for `fitted_draws` to support `stanreg` objects."
  
  ── 7. Error: (unknown) (@test.gather_emmeans_draws.R#6)  ───────────────────────
  there is no package called 'rstanarm'
  1: suppressWarnings(suppressMessages({
         library(dplyr)
         library(tidyr)
         library(rstanarm)
         library(emmeans)
     })) at testthat/test.gather_emmeans_draws.R:6
  2: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  3: suppressMessages({
         library(dplyr)
         library(tidyr)
         library(rstanarm)
         library(emmeans)
     })
  4: withCallingHandlers(expr, message = function(c) invokeRestart("muffleMessage"))
  5: library(rstanarm) at testthat/test.gather_emmeans_draws.R:9
  6: stop(txt, domain = NA)
  
  ── 8. Error: (unknown) (@test.predicted_draws.R#6)  ────────────────────────────
  there is no package called 'rstanarm'
  1: suppressWarnings(suppressMessages({
         library(bindrcpp)
         library(dplyr)
         library(tidyr)
         library(ggplot2)
         library(rstan)
         library(rstanarm)
     })) at testthat/test.predicted_draws.R:6
  2: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  3: suppressMessages({
         library(bindrcpp)
         library(dplyr)
         library(tidyr)
         library(ggplot2)
         library(rstan)
         library(rstanarm)
     })
  4: withCallingHandlers(expr, message = function(c) invokeRestart("muffleMessage"))
  5: library(rstanarm) at testthat/test.predicted_draws.R:12
  6: stop(txt, domain = NA)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 225 SKIPPED: 1 FAILED: 8
  1. Error: [add_]fitted_draws works on a simple rstanarm model (@test.fitted_draws.R#38) 
  2. Error: [add_]fitted_draws works on an rstanarm model with grouped newdata (@test.fitted_draws.R#70) 
  3. Failure: [add_]predicted_draws throws an error when re.form is called instead of re_formula in rstanarm (@test.fitted_draws.R#350) 
  4. Failure: [add_]predicted_draws throws an error when re.form is called instead of re_formula in rstanarm (@test.fitted_draws.R#354) 
  5. Failure: [add_]predicted_draws throws an error when transform is called instead of scale in rstanarm (@test.fitted_draws.R#363) 
  6. Failure: [add_]predicted_draws throws an error when transform is called instead of scale in rstanarm (@test.fitted_draws.R#367) 
  7. Error: (unknown) (@test.gather_emmeans_draws.R#6) 
  8. Error: (unknown) (@test.predicted_draws.R#6) 
  
  Error: testthat unit tests failed
  Execution halted