Running ‘testthat.R’ [66s/70s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(bayesplot)
  This is bayesplot version 1.6.0
  - Online documentation and vignettes at mc-stan.org/bayesplot
  - bayesplot theme set to bayesplot::theme_default()
     * Does _not_ affect other ggplot2 plots
     * See ?bayesplot_theme_set for details on theme setting
  > 
  > Sys.unsetenv("R_TESTS")
  > test_check("bayesplot")
  ── 1. Error: (unknown) (@test-extractors.R#2)  ─────────────────────────────────
  package or namespace load failed for 'rstanarm' in library.dynam(lib, package, package.lib):
   shared object 'rstanarm.so' not found
  1: suppressPackageStartupMessages(library(rstanarm)) at testthat/test-extractors.R:2
  2: withCallingHandlers(expr, packageStartupMessage = function(c) invokeRestart("muffleMessage"))
  3: library(rstanarm)
  4: tryCatch({
         attr(package, "LibPath") <- which.lib.loc
         ns <- loadNamespace(package, lib.loc)
         env <- attachNamespace(ns, pos = pos, deps)
     }, error = function(e) {
         P <- if (!is.null(cc <- conditionCall(e))) 
             paste(" in", deparse(cc)[1L])
         else ""
         msg <- gettextf("package or namespace load failed for %s%s:\n %s", sQuote(package), 
             P, conditionMessage(e))
         if (logical.return) 
             message(paste("Error:", msg), domain = NA)
         else stop(msg, call. = FALSE, domain = NA)
     })
  5: tryCatchList(expr, classes, parentenv, handlers)
  6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  7: value[[3L]](cond)
  8: stop(msg, call. = FALSE, domain = NA)
  
  ── 2. Error: (unknown) (@test-mcmc-nuts.R#2)  ──────────────────────────────────
  package or namespace load failed for 'rstanarm' in library.dynam(lib, package, package.lib):
   shared object 'rstanarm.so' not found
  1: suppressPackageStartupMessages(library(rstanarm)) at testthat/test-mcmc-nuts.R:2
  2: withCallingHandlers(expr, packageStartupMessage = function(c) invokeRestart("muffleMessage"))
  3: library(rstanarm)
  4: tryCatch({
         attr(package, "LibPath") <- which.lib.loc
         ns <- loadNamespace(package, lib.loc)
         env <- attachNamespace(ns, pos = pos, deps)
     }, error = function(e) {
         P <- if (!is.null(cc <- conditionCall(e))) 
             paste(" in", deparse(cc)[1L])
         else ""
         msg <- gettextf("package or namespace load failed for %s%s:\n %s", sQuote(package), 
             P, conditionMessage(e))
         if (logical.return) 
             message(paste("Error:", msg), domain = NA)
         else stop(msg, call. = FALSE, domain = NA)
     })
  5: tryCatchList(expr, classes, parentenv, handlers)
  6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  7: value[[3L]](cond)
  8: stop(msg, call. = FALSE, domain = NA)
  
  ── 3. Error: (unknown) (@test-mcmc-recover.R#2)  ───────────────────────────────
  package or namespace load failed for 'rstanarm' in library.dynam(lib, package, package.lib):
   shared object 'rstanarm.so' not found
  1: suppressPackageStartupMessages(library(rstanarm)) at testthat/test-mcmc-recover.R:2
  2: withCallingHandlers(expr, packageStartupMessage = function(c) invokeRestart("muffleMessage"))
  3: library(rstanarm)
  4: tryCatch({
         attr(package, "LibPath") <- which.lib.loc
         ns <- loadNamespace(package, lib.loc)
         env <- attachNamespace(ns, pos = pos, deps)
     }, error = function(e) {
         P <- if (!is.null(cc <- conditionCall(e))) 
             paste(" in", deparse(cc)[1L])
         else ""
         msg <- gettextf("package or namespace load failed for %s%s:\n %s", sQuote(package), 
             P, conditionMessage(e))
         if (logical.return) 
             message(paste("Error:", msg), domain = NA)
         else stop(msg, call. = FALSE, domain = NA)
     })
  5: tryCatchList(expr, classes, parentenv, handlers)
  6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  7: value[[3L]](cond)
  8: stop(msg, call. = FALSE, domain = NA)
  
  ── 4. Error: (unknown) (@test-mcmc-scatter-and-parcoord.R#2)  ──────────────────
  package or namespace load failed for 'rstanarm' in library.dynam(lib, package, package.lib):
   shared object 'rstanarm.so' not found
  1: suppressPackageStartupMessages(library(rstanarm)) at testthat/test-mcmc-scatter-and-parcoord.R:2
  2: withCallingHandlers(expr, packageStartupMessage = function(c) invokeRestart("muffleMessage"))
  3: library(rstanarm)
  4: tryCatch({
         attr(package, "LibPath") <- which.lib.loc
         ns <- loadNamespace(package, lib.loc)
         env <- attachNamespace(ns, pos = pos, deps)
     }, error = function(e) {
         P <- if (!is.null(cc <- conditionCall(e))) 
             paste(" in", deparse(cc)[1L])
         else ""
         msg <- gettextf("package or namespace load failed for %s%s:\n %s", sQuote(package), 
             P, conditionMessage(e))
         if (logical.return) 
             message(paste("Error:", msg), domain = NA)
         else stop(msg, call. = FALSE, domain = NA)
     })
  5: tryCatchList(expr, classes, parentenv, handlers)
  6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  7: value[[3L]](cond)
  8: stop(msg, call. = FALSE, domain = NA)
  
  ── 5. Error: mcmc_trace 'np' argument works (@test-mcmc-traces.R#46)  ──────────
  package or namespace load failed for 'rstanarm' in library.dynam(lib, package, package.lib):
   shared object 'rstanarm.so' not found
  1: suppressPackageStartupMessages(library(rstanarm)) at testthat/test-mcmc-traces.R:46
  2: withCallingHandlers(expr, packageStartupMessage = function(c) invokeRestart("muffleMessage"))
  3: library(rstanarm)
  4: tryCatch({
         attr(package, "LibPath") <- which.lib.loc
         ns <- loadNamespace(package, lib.loc)
         env <- attachNamespace(ns, pos = pos, deps)
     }, error = function(e) {
         P <- if (!is.null(cc <- conditionCall(e))) 
             paste(" in", deparse(cc)[1L])
         else ""
         msg <- gettextf("package or namespace load failed for %s%s:\n %s", sQuote(package), 
             P, conditionMessage(e))
         if (logical.return) 
             message(paste("Error:", msg), domain = NA)
         else stop(msg, call. = FALSE, domain = NA)
     })
  5: tryCatchList(expr, classes, parentenv, handlers)
  6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  7: value[[3L]](cond)
  8: stop(msg, call. = FALSE, domain = NA)
  
  ── 6. Error: (unknown) (@test-ppc-discrete.R#2)  ───────────────────────────────
  package or namespace load failed for 'rstanarm' in library.dynam(lib, package, package.lib):
   shared object 'rstanarm.so' not found
  1: suppressPackageStartupMessages(library(rstanarm)) at testthat/test-ppc-discrete.R:2
  2: withCallingHandlers(expr, packageStartupMessage = function(c) invokeRestart("muffleMessage"))
  3: library(rstanarm)
  4: tryCatch({
         attr(package, "LibPath") <- which.lib.loc
         ns <- loadNamespace(package, lib.loc)
         env <- attachNamespace(ns, pos = pos, deps)
     }, error = function(e) {
         P <- if (!is.null(cc <- conditionCall(e))) 
             paste(" in", deparse(cc)[1L])
         else ""
         msg <- gettextf("package or namespace load failed for %s%s:\n %s", sQuote(package), 
             P, conditionMessage(e))
         if (logical.return) 
             message(paste("Error:", msg), domain = NA)
         else stop(msg, call. = FALSE, domain = NA)
     })
  5: tryCatchList(expr, classes, parentenv, handlers)
  6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  7: value[[3L]](cond)
  8: stop(msg, call. = FALSE, domain = NA)
  
  ── 7. Error: (unknown) (@test-ppc-loo.R#2)  ────────────────────────────────────
  package or namespace load failed for 'rstanarm' in library.dynam(lib, package, package.lib):
   shared object 'rstanarm.so' not found
  1: suppressPackageStartupMessages(library(rstanarm)) at testthat/test-ppc-loo.R:2
  2: withCallingHandlers(expr, packageStartupMessage = function(c) invokeRestart("muffleMessage"))
  3: library(rstanarm)
  4: tryCatch({
         attr(package, "LibPath") <- which.lib.loc
         ns <- loadNamespace(package, lib.loc)
         env <- attachNamespace(ns, pos = pos, deps)
     }, error = function(e) {
         P <- if (!is.null(cc <- conditionCall(e))) 
             paste(" in", deparse(cc)[1L])
         else ""
         msg <- gettextf("package or namespace load failed for %s%s:\n %s", sQuote(package), 
             P, conditionMessage(e))
         if (logical.return) 
             message(paste("Error:", msg), domain = NA)
         else stop(msg, call. = FALSE, domain = NA)
     })
  5: tryCatchList(expr, classes, parentenv, handlers)
  6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  7: value[[3L]](cond)
  8: stop(msg, call. = FALSE, domain = NA)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 760 SKIPPED: 18 FAILED: 7
  1. Error: (unknown) (@test-extractors.R#2) 
  2. Error: (unknown) (@test-mcmc-nuts.R#2) 
  3. Error: (unknown) (@test-mcmc-recover.R#2) 
  4. Error: (unknown) (@test-mcmc-scatter-and-parcoord.R#2) 
  5. Error: mcmc_trace 'np' argument works (@test-mcmc-traces.R#46) 
  6. Error: (unknown) (@test-ppc-discrete.R#2) 
  7. Error: (unknown) (@test-ppc-loo.R#2) 
  
  Error: testthat unit tests failed
  Execution halted