Running 'testthat.R' [159s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(clubSandwich)
  Registered S3 method overwritten by 'clubSandwich':
    method    from    
    bread.mlm sandwich
  > 
  > test_check("clubSandwich")
  Saving _problems/test_gls-90.R
  Saving _problems/test_gls-98.R
  Saving _problems/test_gls-113.R
  Saving _problems/test_gls-127.R
  Saving _problems/test_gls-157.R
  [ FAIL 5 | WARN 0 | SKIP 29 | PASS 1650 ]
  
  ══ Skipped tests (29) ══════════════════════════════════════════════════════════
  • Need to understand target-unbiasedness for ivreg objects. (2):
    'test_AER_ivreg.R:141:3', 'test_ivreg_ivreg.R:141:3'
  • On CRAN (25): 'test_Wald.R:155:3', 'test_Wald.R:209:3', 'test_Wald.R:243:3',
    'test_geeglm.R:161:3', 'test_linear_contrast.R:136:3',
    'test_lme_3level.R:39:3', 'test_lme_3level.R:76:3',
    'test_lme_3level.R:116:3', 'test_lme_3level.R:127:3',
    'test_lme_3level.R:138:3', 'test_lme_3level.R:179:3', 'test_lme_MVML.R:4:1',
    'test_lmerMod.R:124:3', 'test_mlm.R:94:3',
    'test_plm-first-differences.R:92:3', 'test_plm-fixed-effects.R:146:3',
    'test_plm-unbalanced-fixed-effects.R:170:3', 'test_rma-ls.R:26:3',
    'test_rma-mv.R:101:3', 'test_rma-mv.R:202:3', 'test_rma-mv.R:306:3',
    'test_rma-uni.R:76:3', 'test_robu.R:173:3', 'test_robu.R:210:3',
    'test_robu.R:252:3'
  • empty test (1): 'test_estfun.R:50:1'
  • packageVersion("plm") > "2.6-1" is TRUE (1):
    'test_plm-first-differences.R:41:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test_gls.R:90:3'): get_data works. ────────────────────────────────
  Expected `egg_scramble` to equal `scramble_dat`.
  Differences:
  Names: 4 string mismatches
  Attributes: < Length mismatch: comparison on first 1 components >
  Attributes: < Component "class": Lengths (4, 3) differ (string compare on first 3) >
  Attributes: < Component "class": 3 string mismatches >
  Component 1: 'current' is not a factor
  Component 2: Modes: numeric, call
  Component 2: Lengths: 308, 3
  Component 2: names for current but not for target
  Component 2: target is numeric, current is call
  ...
  ── Error ('test_gls.R:98:3'): get_data works. ──────────────────────────────────
  Error in `as.data.frame.default(data, optional = TRUE)`: cannot coerce class 'c("objectNotFoundError", "error", "condition")' to a data.frame
  Backtrace:
       ▆
    1. ├─clubSandwich::vcovCR(m2, cluster = cars_30, type = "CR0") at test_gls.R:98:3
    2. └─clubSandwich:::vcovCR.gls(m2, cluster = cars_30, type = "CR0")
    3.   └─clubSandwich:::vcov_CR(...)
    4.     ├─clubSandwich:::model_matrix(obj)
    5.     └─clubSandwich:::model_matrix.gls(obj)
    6.       ├─stats::model.matrix(formula(obj), data = dat)
    7.       └─stats::model.matrix.default(formula(obj), data = dat)
    8.         ├─stats::terms(object, data = data)
    9.         └─stats::terms.formula(object, data = data)
   10.           ├─base::as.data.frame(data, optional = TRUE)
   11.           └─base::as.data.frame.default(data, optional = TRUE)
  ── Error ('test_gls.R:112:3'): Order doesn't matter. ───────────────────────────
  Error in `as.data.frame.default(data, optional = TRUE)`: cannot coerce class 'c("objectNotFoundError", "error", "condition")' to a data.frame
  Backtrace:
       ▆
    1. └─clubSandwich:::check_sort_order(...) at test_gls.R:112:3
    2.   └─base::lapply(CR_types, function(x) vcovCR(obj_scramble, type = x))
    3.     └─clubSandwich (local) FUN(X[[i]], ...)
    4.       ├─clubSandwich::vcovCR(obj_scramble, type = x)
    5.       └─clubSandwich:::vcovCR.gls(obj_scramble, type = x)
    6.         └─clubSandwich:::vcov_CR(...)
    7.           ├─clubSandwich:::model_matrix(obj)
    8.           └─clubSandwich:::model_matrix.gls(obj)
    9.             ├─stats::model.matrix(formula(obj), data = dat)
   10.             └─stats::model.matrix.default(formula(obj), data = dat)
   11.               ├─stats::terms(object, data = data)
   12.               └─stats::terms.formula(object, data = data)
   13.                 ├─base::as.data.frame(data, optional = TRUE)
   14.                 └─base::as.data.frame.default(data, optional = TRUE)
  ── Error ('test_gls.R:127:31'): clubSandwich works with dropped observations ───
  Error in `data[-naAct, ]`: incorrect number of dimensions
  Backtrace:
      ▆
   1. └─base::lapply(CR_types, function(x) vcovCR(lm_dropped, type = x)) at test_gls.R:127:3
   2.   └─clubSandwich (local) FUN(X[[i]], ...)
   3.     ├─clubSandwich::vcovCR(lm_dropped, type = x) at test_gls.R:127:31
   4.     └─clubSandwich:::vcovCR.gls(lm_dropped, type = x)
   5.       └─clubSandwich:::vcov_CR(...)
   6.         ├─clubSandwich:::model_matrix(obj)
   7.         └─clubSandwich:::model_matrix.gls(obj)
   8.           └─clubSandwich:::get_data(obj)
  ── Error ('test_gls.R:156:3'): Possible to cluster at higher level than random effects ──
  Error in `as.data.frame.default(data, optional = TRUE)`: cannot coerce class 'c("objectNotFoundError", "error", "condition")' to a data.frame
  Backtrace:
       ▆
    1. ├─clubSandwich::vcovCR(...) at test_gls.R:156:3
    2. └─clubSandwich:::vcovCR.gls(...)
    3.   └─clubSandwich:::vcov_CR(...)
    4.     ├─clubSandwich:::model_matrix(obj)
    5.     └─clubSandwich:::model_matrix.gls(obj)
    6.       ├─stats::model.matrix(formula(obj), data = dat)
    7.       └─stats::model.matrix.default(formula(obj), data = dat)
    8.         ├─stats::terms(object, data = data)
    9.         └─stats::terms.formula(object, data = data)
   10.           ├─base::as.data.frame(data, optional = TRUE)
   11.           └─base::as.data.frame.default(data, optional = TRUE)
  
  [ FAIL 5 | WARN 0 | SKIP 29 | PASS 1650 ]
  Error:
  ! Test failures.
  Execution halted