Running ‘testthat.R’ [96s/104s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # rm(list = ls())
  > # Sys.setenv("R_TESTS" = "")
  > library(testthat)
  > library(collapse)
  collapse 1.4.2, see ?`collapse-package` or ?`collapse-documentation`
  Note: stats::D  ->  D.expression, D.call, D.name
  
  Attaching package: 'collapse'
  
  The following object is masked from 'package:stats':
  
      D
  
  > 
  > test_check("collapse")
  ── ERROR (test-fHDbetween-fHDwithin-HDB-HDW.R:88:3): fHDbetween with two factors
  Error: For higher-dimensional centering and projecting out interactions need to install.packages('lfe'), then unload [detach('package:collapse', unload = TRUE)] and reload [library(collapse)].
  Backtrace:
      █
   1. ├─testthat::expect_equal(...) test-fHDbetween-fHDwithin-HDB-HDW.R:88:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─collapse::fHDbetween(x, fl)
   5. └─collapse::fHDbetween.default(x, fl)
   6.   ├─collapse:::setAttributes(...)
   7.   └─collapse:::demean(x, fl, weights = w, means = TRUE, ...)
   8.     └─collapse:::getenvFUN("lfe_demeanlist", msg)
  
  ── ERROR (test-fHDbetween-fHDwithin-HDB-HDW.R:103:3): fHDwithin with two factors
  Error: For higher-dimensional centering and projecting out interactions need to install.packages('lfe'), then unload [detach('package:collapse', unload = TRUE)] and reload [library(collapse)].
  Backtrace:
      █
   1. ├─testthat::expect_equal(...) test-fHDbetween-fHDwithin-HDB-HDW.R:103:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─collapse::fHDwithin(x, fl)
   5. └─collapse::fHDwithin.default(x, fl)
   6.   ├─collapse:::setAttributes(demean(x, fl, weights = w, ...), ax)
   7.   └─collapse:::demean(x, fl, weights = w, ...)
   8.     └─collapse:::getenvFUN("lfe_demeanlist", msg)
  
  ── ERROR (test-fHDbetween-fHDwithin-HDB-HDW.R:158:3): fHDbetween with multiple v
  Error: For higher-dimensional centering and projecting out interactions need to install.packages('lfe'), then unload [detach('package:collapse', unload = TRUE)] and reload [library(collapse)].
  Backtrace:
      █
   1. ├─testthat::expect_equal(...) test-fHDbetween-fHDwithin-HDB-HDW.R:158:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─collapse::fHDbetween(data$PCGDP, data[-5])
   5. └─collapse::fHDbetween.default(data$PCGDP, data[-5])
   6.   └─collapse:::demean(...)
   7.     └─collapse:::getenvFUN("lfe_demeanlist", msg)
  
  ── ERROR (test-fHDbetween-fHDwithin-HDB-HDW.R:181:3): fHDwithin with multiple va
  Error: For higher-dimensional centering and projecting out interactions need to install.packages('lfe'), then unload [detach('package:collapse', unload = TRUE)] and reload [library(collapse)].
  Backtrace:
      █
   1. ├─testthat::expect_equal(...) test-fHDbetween-fHDwithin-HDB-HDW.R:181:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─collapse::fHDwithin(data$PCGDP, data[-5])
   5. └─collapse::fHDwithin.default(data$PCGDP, data[-5])
   6.   └─collapse:::demean(...)
   7.     └─collapse:::getenvFUN("lfe_demeanlist", msg)
  
  ── ERROR (???): HDW data.frame method (formula input) performs properly ────────
  Error: For higher-dimensional centering and projecting out interactions need to install.packages('lfe'), then unload [detach('package:collapse', unload = TRUE)] and reload [library(collapse)].
  Backtrace:
      █
   1. ├─stats::model.frame(...)
   2. ├─stats::model.frame.default(...)
   3. │ └─base::is.data.frame(data)
   4. ├─collapse::HDW(...)
   5. └─collapse:::HDW.data.frame(...)
   6.   └─collapse:::demean(...)
   7.     └─collapse:::getenvFUN("lfe_demeanlist", msg)
  
  ── ERROR (???): HDW data.frame method (formula input) with 2-sided formula perfo
  Error: For higher-dimensional centering and projecting out interactions need to install.packages('lfe'), then unload [detach('package:collapse', unload = TRUE)] and reload [library(collapse)].
  Backtrace:
      █
   1. ├─stats::model.frame(...)
   2. ├─stats::model.frame.default(...)
   3. │ └─base::is.data.frame(data)
   4. ├─collapse::HDW(...)
   5. └─collapse:::HDW.data.frame(...)
   6.   └─collapse:::demean(...)
   7.     └─collapse:::getenvFUN("lfe_demeanlist", msg)
  
  ── ERROR (???): HDW data.frame method (formula input) with 2-sided formula and m
  Error: For higher-dimensional centering and projecting out interactions need to install.packages('lfe'), then unload [detach('package:collapse', unload = TRUE)] and reload [library(collapse)].
  Backtrace:
      █
   1. ├─stats::model.frame(...)
   2. ├─stats::model.frame.default(...)
   3. │ └─base::is.data.frame(data)
   4. ├─collapse::HDW(...)
   5. └─collapse:::HDW.data.frame(...)
   6.   └─collapse:::demean(...)
   7.     └─collapse:::getenvFUN("lfe_demeanlist", msg)
  
  ── ERROR (test-flm-fFtest.R:37:3): fFtest works as intended ────────────────────
  Error: For higher-dimensional centering and projecting out interactions need to install.packages('lfe'), then unload [detach('package:collapse', unload = TRUE)] and reload [library(collapse)].
  Backtrace:
      █
   1. └─collapse::fFtest(...) test-flm-fFtest.R:37:2
   2.   ├─collapse::fvar.default(...)
   3.   └─collapse::fHDwithin.default(...)
   4.     └─collapse:::demean(...)
   5.       └─collapse:::getenvFUN("lfe_demeanlist", msg)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  ERROR (test-fHDbetween-fHDwithin-HDB-HDW.R:88:3): fHDbetween with two factors performs like lfe::demeanlist
  ERROR (test-fHDbetween-fHDwithin-HDB-HDW.R:103:3): fHDwithin with two factors performs like lfe::demeanlist
  ERROR (test-fHDbetween-fHDwithin-HDB-HDW.R:158:3): fHDbetween with multiple variables performs like lm
  ERROR (test-fHDbetween-fHDwithin-HDB-HDW.R:181:3): fHDwithin with multiple variables performs like lm
  ERROR (???): HDW data.frame method (formula input) performs properly
  ERROR (???): HDW data.frame method (formula input) with 2-sided formula performs properly
  ERROR (???): HDW data.frame method (formula input) with 2-sided formula and missing values performs properly
  ERROR (test-flm-fFtest.R:37:3): fFtest works as intended
  
  [ FAIL 8 | WARN 0 | SKIP 0 | PASS 9587 ]
  Error: Test failures
  Execution halted