Running ‘testthat.R’ [23s/33s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(tidyfit)
  > 
  > test_check("tidyfit")
  
  Attaching package: 'dplyr'
  
  The following object is masked from 'package:tidyfit':
  
      explain
  
  The following object is masked from 'package:testthat':
  
      matches
  
  The following objects are masked from 'package:stats':
  
      filter, lag
  
  The following objects are masked from 'package:base':
  
      intersect, setdiff, setequal, union
  
  [ FAIL 16 | WARN 0 | SKIP 0 | PASS 115 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-adalasso.R:8:3'): adalasso regression works ────────────────────
  Error in `m("adalasso", medv ~ ., df_reg, lambda = c(0.1))`: Package 'glmnet' is required for method 'adalasso'. Run install.packages('glmnet').
  Backtrace:
      ▆
   1. └─tidyfit::m("adalasso", medv ~ ., df_reg, lambda = c(0.1)) at test-adalasso.R:8:3
  ── Error ('test-adalasso.R:22:3'): adalasso classification works ───────────────
  Error in `m("adalasso", lambda = c(0.1))`: Package 'glmnet' is required for method 'adalasso'. Run install.packages('glmnet').
  Backtrace:
      ▆
   1. ├─tidyfit::classify(df_cls3, Species ~ ., m("adalasso", lambda = c(0.1))) at test-adalasso.R:22:3
   2. └─tidyfit::m("adalasso", lambda = c(0.1))
  ── Error ('test-adalasso.R:35:3'): adalasso classification (2class) works ──────
  Error in `m("adalasso", lambda = c(0.01))`: Package 'glmnet' is required for method 'adalasso'. Run install.packages('glmnet').
  Backtrace:
      ▆
   1. ├─tidyfit::classify(df_cls2, Species ~ ., m("adalasso", lambda = c(0.01))) at test-adalasso.R:35:3
   2. └─tidyfit::m("adalasso", lambda = c(0.01))
  ── Error ('test-bayes.R:8:3'): bayes regression works ──────────────────────────
  Error in `m("bayes", medv ~ ., df_reg)`: Package 'arm' is required for method 'bayes'. Run install.packages('arm').
  Backtrace:
      ▆
   1. └─tidyfit::m("bayes", medv ~ ., df_reg) at test-bayes.R:8:3
  ── Error ('test-bayes.R:22:3'): bayes classification works ─────────────────────
  Error in `m("bayes")`: Package 'arm' is required for method 'bayes'. Run install.packages('arm').
  Backtrace:
      ▆
   1. ├─tidyfit::classify(df_cls2, Species ~ ., m("bayes")) at test-bayes.R:22:3
   2. └─tidyfit::m("bayes")
  ── Error ('test-enet.R:8:3'): enet regression works ────────────────────────────
  Error in `m("enet", medv ~ ., df_reg, lambda = c(0.1), alpha = 0.1)`: Package 'glmnet' is required for method 'enet'. Run install.packages('glmnet').
  Backtrace:
      ▆
   1. └─tidyfit::m("enet", medv ~ ., df_reg, lambda = c(0.1), alpha = 0.1) at test-enet.R:8:3
  ── Error ('test-enet.R:22:3'): enet classification works ───────────────────────
  Error in `m("enet", lambda = c(0.1), alpha = 0.1)`: Package 'glmnet' is required for method 'enet'. Run install.packages('glmnet').
  Backtrace:
      ▆
   1. ├─tidyfit::classify(...) at test-enet.R:22:3
   2. └─tidyfit::m("enet", lambda = c(0.1), alpha = 0.1)
  ── Error ('test-enet.R:35:3'): enet classification (2class) works ──────────────
  Error in `m("enet", lambda = c(0.01), alpha = 0.1)`: Package 'glmnet' is required for method 'enet'. Run install.packages('glmnet').
  Backtrace:
      ▆
   1. ├─tidyfit::classify(...) at test-enet.R:35:3
   2. └─tidyfit::m("enet", lambda = c(0.01), alpha = 0.1)
  ── Error ('test-glmm.R:5:3'): glmm regression works ────────────────────────────
  Error in `m("glmm", Return ~ `Mkt-RF` + `Mkt-RF` | Industry, df_reg)`: Package 'lme4' is required for method 'glmm'. Run install.packages('lme4').
  Backtrace:
      ▆
   1. └─tidyfit::m("glmm", Return ~ `Mkt-RF` + `Mkt-RF` | Industry, df_reg) at test-glmm.R:5:3
  ── Error ('test-glmm.R:19:3'): glm classification works ────────────────────────
  Error in `m("glmm")`: Package 'lme4' is required for method 'glmm'. Run install.packages('lme4').
  Backtrace:
      ▆
   1. ├─tidyfit::classify(df_reg, Return ~ CMA + CMA | Industry, m("glmm")) at test-glmm.R:19:3
   2. └─tidyfit::m("glmm")
  ── Error ('test-lasso.R:8:3'): lasso regression works ──────────────────────────
  Error in `m("lasso", medv ~ ., df_reg, lambda = c(0.1))`: Package 'glmnet' is required for method 'lasso'. Run install.packages('glmnet').
  Backtrace:
      ▆
   1. └─tidyfit::m("lasso", medv ~ ., df_reg, lambda = c(0.1)) at test-lasso.R:8:3
  ── Error ('test-lasso.R:22:3'): lasso classification works ─────────────────────
  Error in `m("lasso", lambda = c(0.1))`: Package 'glmnet' is required for method 'lasso'. Run install.packages('glmnet').
  Backtrace:
      ▆
   1. ├─tidyfit::classify(df_cls3, Species ~ ., m("lasso", lambda = c(0.1))) at test-lasso.R:22:3
   2. └─tidyfit::m("lasso", lambda = c(0.1))
  ── Error ('test-lasso.R:35:3'): lasso classification (2class) works ────────────
  Error in `m("lasso", lambda = c(0.01))`: Package 'glmnet' is required for method 'lasso'. Run install.packages('glmnet').
  Backtrace:
      ▆
   1. ├─tidyfit::classify(df_cls2, Species ~ ., m("lasso", lambda = c(0.01))) at test-lasso.R:35:3
   2. └─tidyfit::m("lasso", lambda = c(0.01))
  ── Error ('test-ridge.R:8:3'): ridge regression works ──────────────────────────
  Error in `m("ridge", medv ~ ., df_reg, lambda = c(0.1))`: Package 'glmnet' is required for method 'ridge'. Run install.packages('glmnet').
  Backtrace:
      ▆
   1. └─tidyfit::m("ridge", medv ~ ., df_reg, lambda = c(0.1)) at test-ridge.R:8:3
  ── Error ('test-ridge.R:22:3'): ridge classification works ─────────────────────
  Error in `m("ridge", lambda = c(0.1))`: Package 'glmnet' is required for method 'ridge'. Run install.packages('glmnet').
  Backtrace:
      ▆
   1. ├─tidyfit::classify(df_cls3, Species ~ ., m("ridge", lambda = c(0.1))) at test-ridge.R:22:3
   2. └─tidyfit::m("ridge", lambda = c(0.1))
  ── Error ('test-ridge.R:35:3'): ridge classification (2class) works ────────────
  Error in `m("ridge", lambda = c(0.01))`: Package 'glmnet' is required for method 'ridge'. Run install.packages('glmnet').
  Backtrace:
      ▆
   1. ├─tidyfit::classify(df_cls2, Species ~ ., m("ridge", lambda = c(0.01))) at test-ridge.R:35:3
   2. └─tidyfit::m("ridge", lambda = c(0.01))
  
  [ FAIL 16 | WARN 0 | SKIP 0 | PASS 115 ]
  Error: Test failures
  Execution halted