Running ‘testthat.R’ [67s/79s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(DeclareDesign)
  Loading required package: randomizr
  Loading required package: fabricatr
  Loading required package: estimatr
  > 
  > library(AER)
  Loading required package: car
  Loading required package: carData
  Loading required package: lmtest
  Loading required package: zoo
  
  Attaching package: 'zoo'
  
  The following objects are masked from 'package:base':
  
      as.Date, as.Date.numeric
  
  Loading required package: sandwich
  Loading required package: survival
  > library(betareg)
  > library(biglm)
  Loading required package: DBI
  > library(coin)
  
  Attaching package: 'coin'
  
  The following object is masked from 'package:testthat':
  
      expectation
  
  > library(future.apply)
  Loading required package: future
  
  Attaching package: 'future'
  
  The following object is masked from 'package:survival':
  
      cluster
  
  The following object is masked from 'package:lmtest':
  
      reset
  
  > library(gam)
  Loading required package: splines
  Loading required package: foreach
  Loaded gam 1.22-7
  
  > library(Matching)
  Loading required package: MASS
  ## 
  ##  Matching (Version 4.10-15, Build Date: 2024-10-14)
  ##  See https://www.jsekhon.com for additional documentation.
  ##  Please cite software as:
  ##   Jasjeet S. Sekhon. 2011. ``Multivariate and Propensity Score Matching
  ##   Software with Automated Balance Optimization: The Matching package for R.''
  ##   Journal of Statistical Software, 42(7): 1-52. 
  ##
  
  > library(reshape2)
  > library(sf)
  Linking to GEOS 3.14.1, GDAL 3.12.3, PROJ 9.8.1; sf_use_s2() is TRUE
  > 
  > test_check("DeclareDesign")
  Error : No estimates or inquiries were declared, so design cannot be simulated.
  Saving _problems/test-modify-design-25.R
  Saving _problems/test-modify-design-94.R
  Saving _problems/test-modify-design-106.R
  Saving _problems/test-modify-design-114.R
  Saving _problems/test-modify-design-121.R
  Saving _problems/test-name-steps-8.R
  Saving _problems/test-name-steps-12.R
  Saving _problems/test-names-and-labels-73.R
  Saving _problems/test-print-code-30.R
  [ FAIL 9 | WARN 0 | SKIP 7 | PASS 638 ]
  
  ══ Skipped tests (7) ═══════════════════════════════════════════════════════════
  • On CRAN (1): 'test-reshape-diagnosis.R:123:3'
  • test requires updated DesignLbrary (6): 'test-design-library.R:7:3',
    'test-design-library.R:37:3', 'test-design-library.R:46:3',
    'test-design-library.R:136:3', 'test-simulate-design.R:121:3',
    'test-simulate-design.R:137:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-modify-design.R:25:3'): test modify declare design  ──────────
  Expected `names(redesigned)` to equal `c("my_population", "my_potential_outcomes", "custom", "my_assignment_2")`.
  Differences:
  2/4 mismatches
  x[1]: "model"
  y[1]: "my_population"
  
  x[2]: "potential_outcomes"
  y[2]: "my_potential_outcomes"
  ── Failure ('test-modify-design.R:91:3'): names are correct ────────────────────
  Expected `names(neighbors_design)` to equal `c(...)`.
  Differences:
  2/5 mismatches
  x[1]: "model"
  y[1]: "my_population"
  
  x[2]: "model_1"
  y[2]: "my_potential_outcomes"
  ── Failure ('test-modify-design.R:100:3'): names are correct ───────────────────
  Expected `names(check0)` to equal `c(...)`.
  Differences:
  2/6 mismatches
  x[1]: "model"
  y[1]: "my_population"
  
  x[2]: "model_1"
  y[2]: "my_potential_outcomes"
  ── Failure ('test-modify-design.R:108:3'): names are correct ───────────────────
  Expected `names(check1)` to equal `c(...)`.
  Differences:
  2/6 mismatches
  x[1]: "model"
  y[1]: "my_population"
  
  x[2]: "model_1"
  y[2]: "my_potential_outcomes"
  ── Failure ('test-modify-design.R:115:3'): names are correct ───────────────────
  Expected `names(check2)` to equal `c(...)`.
  Differences:
  2/7 mismatches
  x[1]: "model"
  y[1]: "my_population"
  
  x[2]: "model_1"
  y[2]: "my_potential_outcomes"
  ── Failure ('test-name-steps.R:8:3'): design steps are named appropriately when blank ──
  Expected `names(des)` to equal `c("pop", "model")`.
  Differences:
  2/2 mismatches
  x[1]: "model"
  y[1]: "pop"
  
  x[2]: "model_1"
  y[2]: "model"
  ── Failure ('test-name-steps.R:12:3'): design steps are named appropriately when blank ──
  Expected `names(des)` to equal `c("model", "smp")`.
  Differences:
  1/2 mismatches
  x[2]: "sampling"
  y[2]: "smp"
  ── Failure ('test-names-and-labels.R:73:3'): step name conflicts in design ─────
  Expected `names(pop + assign_1 + assign_1)` to equal `c("pop", "assign_1", "assign_1_1")`.
  Differences:
  3/3 mismatches
  x[1]: "model"
  y[1]: "pop"
  
  x[2]: "assignment"
  y[2]: "assign_1"
  
  x[3]: "assignment_1"
  y[3]: "assign_1_1"
  ── Failure ('test-print-code.R:30:3'): print code works ────────────────────────
  Expected output from `print_code(design)` to match regexp "my_population <- declare".
  Actual output:
  ✖ │ model <- declare_model(N = N, noise = rnorm(N)) 
    │ 
    │ potential_outcomes <- declare_potential_outcomes(Y_Z_0 = noise, Y_Z_1 = noise + rnorm(N, mean = 2, sd = 2)) 
    │ 
    │ sampling <- declare_sampling(S = complete_rs(N, n = 250)) 
    │ 
    │ ATE <- declare_inquiry(ATE = mean(Y_Z_1 - Y_Z_0)) 
    │ 
    │ custom <- declare_step(dplyr::mutate, q = 5) 
    │ 
    │ custom_1 <- declare_step(dplyr::mutate, q = 6) 
    │ 
    │ assignment <- declare_assignment(Z = complete_ra(N, m = 25)) 
    │ 
    │ measurement <- declare_measurement(Y = reveal_outcomes(Y ~ Z)) 
    │ 
    │ estimator <- declare_estimator(Y ~ Z, inquiry = my_inquiry) 
    │ 
    │ my_design <- construct_design(steps = steps) 
    │ 
  
  [ FAIL 9 | WARN 0 | SKIP 7 | PASS 638 ]
  Error:
  ! Test failures.
  Execution halted