Running ‘testthat.R’ [32s/35s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(projpred)
  This is projpred version 1.0.0
  
  Note: The type of the returned objects of varsel/cv_varsel have changed
  since the latest release, although this does not affect how the functions
  are used.
  > library(rstanarm) # we need rstanarm for running the tests
  Loading required package: Rcpp
  rstanarm (Version 2.18.1, packaged: 2018-10-20 22:29:40 UTC)
  - Do not expect the default priors to remain the same in future rstanarm versions.
  Thus, R scripts should specify priors explicitly, even if they are just the defaults.
  - For execution on a local, multicore CPU with excess RAM we recommend calling
  options(mc.cores = parallel::detectCores())
  - Plotting theme set to bayesplot::theme_default().
  > 
  > test_check("projpred")
  ── 1. Error: (unknown) (@test_as_matrix.R#38)  ─────────────────────────────────
  invalid subscript type 'list'
  1: varsel(fit_binom) at testthat/test_as_matrix.R:38
  2: get_refmodel(object, ...)
  3: get_refmodel.stanreg(object, ...)
  4: init_refmodel(z = z, y = y, family = fam, x = x, predfun = predfun, dis = dis, offset = offset, 
         wobs = wobs, wsample = wsample, intercept = intercept, cvfits = NULL, cvfun = cvfun)
  5: predmu(z, offset)
  6: family$linkinv(family$linkfun(predfun(z)) + offset)
  7: family$linkfun(predfun(z))
  8: predfun(z)
  9: t(rstanarm::posterior_linpred(object, newdata = data.frame(zt), transform = T, offset = rep(0, 
         nrow(zt))))
  10: rstanarm::posterior_linpred(object, newdata = data.frame(zt), transform = T, offset = rep(0, 
         nrow(zt)))
  11: posterior_linpred.stanreg(object, newdata = data.frame(zt), transform = T, offset = rep(0, 
         nrow(zt)))
  12: validate_newdata(newdata)
  13: drop_redundant_dims(x)
  14: lapply(data[, drop_dim, drop = FALSE], drop)
  15: data[, drop_dim, drop = FALSE]
  16: `[.data.frame`(data, , drop_dim, drop = FALSE)
  
  ── 2. Error: check that the main function calls do not return the same RNG state
  invalid subscript type 'list'
  1: varsel(fit, seed = seed) at testthat/test_misc.R:57
  2: get_refmodel(object, ...)
  3: get_refmodel.stanreg(object, ...)
  4: init_refmodel(z = z, y = y, family = fam, x = x, predfun = predfun, dis = dis, offset = offset, 
         wobs = wobs, wsample = wsample, intercept = intercept, cvfits = NULL, cvfun = cvfun)
  5: predmu(z, offset)
  6: family$linkinv(family$linkfun(predfun(z)) + offset)
  7: family$linkfun(predfun(z))
  8: predfun(z)
  9: t(rstanarm::posterior_linpred(object, newdata = data.frame(zt), transform = T, offset = rep(0, 
         nrow(zt))))
  10: rstanarm::posterior_linpred(object, newdata = data.frame(zt), transform = T, offset = rep(0, 
         nrow(zt)))
  11: posterior_linpred.stanreg(object, newdata = data.frame(zt), transform = T, offset = rep(0, 
         nrow(zt)))
  12: validate_newdata(newdata)
  13: drop_redundant_dims(x)
  14: lapply(data[, drop_dim, drop = FALSE], drop)
  15: data[, drop_dim, drop = FALSE]
  16: `[.data.frame`(data, , drop_dim, drop = FALSE)
  
  ── 3. Error: check that providing seed has the expected effect (@test_misc.R#108
  invalid subscript type 'list'
  1: varsel(fit, seed = seed) at testthat/test_misc.R:108
  2: get_refmodel(object, ...)
  3: get_refmodel.stanreg(object, ...)
  4: init_refmodel(z = z, y = y, family = fam, x = x, predfun = predfun, dis = dis, offset = offset, 
         wobs = wobs, wsample = wsample, intercept = intercept, cvfits = NULL, cvfun = cvfun)
  5: predmu(z, offset)
  6: family$linkinv(family$linkfun(predfun(z)) + offset)
  7: family$linkfun(predfun(z))
  8: predfun(z)
  9: t(rstanarm::posterior_linpred(object, newdata = data.frame(zt), transform = T, offset = rep(0, 
         nrow(zt))))
  10: rstanarm::posterior_linpred(object, newdata = data.frame(zt), transform = T, offset = rep(0, 
         nrow(zt)))
  11: posterior_linpred.stanreg(object, newdata = data.frame(zt), transform = T, offset = rep(0, 
         nrow(zt)))
  12: validate_newdata(newdata)
  13: drop_redundant_dims(x)
  14: lapply(data[, drop_dim, drop = FALSE], drop)
  15: data[, drop_dim, drop = FALSE]
  16: `[.data.frame`(data, , drop_dim, drop = FALSE)
  
  ── 4. Error: (unknown) (@test_proj_pred.R#48)  ─────────────────────────────────
  invalid subscript type 'list'
  1: lapply(fit_list, varsel, nv_max = nv, verbose = FALSE) at testthat/test_proj_pred.R:48
  2: FUN(X[[i]], ...)
  3: get_refmodel(object, ...)
  4: get_refmodel.stanreg(object, ...)
  5: init_refmodel(z = z, y = y, family = fam, x = x, predfun = predfun, dis = dis, offset = offset, 
         wobs = wobs, wsample = wsample, intercept = intercept, cvfits = NULL, cvfun = cvfun)
  6: predmu(z, offset)
  7: family$linkinv(family$linkfun(predfun(z)) + offset)
  8: family$linkfun(predfun(z))
  9: predfun(z)
  10: t(rstanarm::posterior_linpred(object, newdata = data.frame(zt), transform = T, offset = rep(0, 
         nrow(zt))))
  11: rstanarm::posterior_linpred(object, newdata = data.frame(zt), transform = T, offset = rep(0, 
         nrow(zt)))
  12: posterior_linpred.stanreg(object, newdata = data.frame(zt), transform = T, offset = rep(0, 
         nrow(zt)))
  13: validate_newdata(newdata)
  14: drop_redundant_dims(x)
  15: lapply(data[, drop_dim, drop = FALSE], drop)
  16: data[, drop_dim, drop = FALSE]
  17: `[.data.frame`(data, , drop_dim, drop = FALSE)
  
  ── 5. Error: (unknown) (@test_project.R#43)  ───────────────────────────────────
  invalid subscript type 'list'
  1: lapply(fit_list, varsel, nv_max = nv, verbose = FALSE) at testthat/test_project.R:43
  2: FUN(X[[i]], ...)
  3: get_refmodel(object, ...)
  4: get_refmodel.stanreg(object, ...)
  5: init_refmodel(z = z, y = y, family = fam, x = x, predfun = predfun, dis = dis, offset = offset, 
         wobs = wobs, wsample = wsample, intercept = intercept, cvfits = NULL, cvfun = cvfun)
  6: predmu(z, offset)
  7: family$linkinv(family$linkfun(predfun(z)) + offset)
  8: family$linkfun(predfun(z))
  9: predfun(z)
  10: t(rstanarm::posterior_linpred(object, newdata = data.frame(zt), transform = T, offset = rep(0, 
         nrow(zt))))
  11: rstanarm::posterior_linpred(object, newdata = data.frame(zt), transform = T, offset = rep(0, 
         nrow(zt)))
  12: posterior_linpred.stanreg(object, newdata = data.frame(zt), transform = T, offset = rep(0, 
         nrow(zt)))
  13: validate_newdata(newdata)
  14: drop_redundant_dims(x)
  15: lapply(data[, drop_dim, drop = FALSE], drop)
  16: data[, drop_dim, drop = FALSE]
  17: `[.data.frame`(data, , drop_dim, drop = FALSE)
  
  ── 6. Error: (unknown) (@test_varsel.R#46)  ────────────────────────────────────
  invalid subscript type 'list'
  1: lapply(fit_list, vsf, "L1") at testthat/test_varsel.R:46
  2: FUN(X[[i]], ...)
  3: varsel(x, method = m, nv_max = nv, verbose = FALSE) at testthat/test_varsel.R:45
  4: get_refmodel(object, ...)
  5: get_refmodel.stanreg(object, ...)
  6: init_refmodel(z = z, y = y, family = fam, x = x, predfun = predfun, dis = dis, offset = offset, 
         wobs = wobs, wsample = wsample, intercept = intercept, cvfits = NULL, cvfun = cvfun)
  7: predmu(z, offset)
  8: family$linkinv(family$linkfun(predfun(z)) + offset)
  9: family$linkfun(predfun(z))
  10: predfun(z)
  11: t(rstanarm::posterior_linpred(object, newdata = data.frame(zt), transform = T, offset = rep(0, 
         nrow(zt))))
  12: rstanarm::posterior_linpred(object, newdata = data.frame(zt), transform = T, offset = rep(0, 
         nrow(zt)))
  13: posterior_linpred.stanreg(object, newdata = data.frame(zt), transform = T, offset = rep(0, 
         nrow(zt)))
  14: validate_newdata(newdata)
  15: drop_redundant_dims(x)
  16: lapply(data[, drop_dim, drop = FALSE], drop)
  17: data[, drop_dim, drop = FALSE]
  18: `[.data.frame`(data, , drop_dim, drop = FALSE)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 546 SKIPPED: 0 FAILED: 6
  1. Error: (unknown) (@test_as_matrix.R#38) 
  2. Error: check that the main function calls do not return the same RNG state every time (@test_misc.R#57) 
  3. Error: check that providing seed has the expected effect (@test_misc.R#108) 
  4. Error: (unknown) (@test_proj_pred.R#48) 
  5. Error: (unknown) (@test_project.R#43) 
  6. Error: (unknown) (@test_varsel.R#46) 
  
  Error: testthat unit tests failed
  Execution halted