* using log directory ‘/data/gannet/ripley/R/packages/tests-Suggests/DeclareDesign.Rcheck’ * using R Under development (unstable) (2024-04-11 r86406) * using platform: x86_64-pc-linux-gnu * R was compiled by gcc-13 (GCC) 13.2.0 GNU Fortran (GCC) 13.2.0 * running under: Fedora Linux 36 (Workstation Edition) * using session charset: UTF-8 * using option ‘--no-stop-on-test-error’ * checking for file ‘DeclareDesign/DESCRIPTION’ ... OK * this is package ‘DeclareDesign’ version ‘1.0.8’ * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... NOTE Package suggested but not available for checking: ‘margins’ * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘DeclareDesign’ can be installed ... [10s/33s] OK * checking package directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... [4s/14s] OK * checking whether the package can be loaded with stated dependencies ... [4s/12s] OK * checking whether the package can be unloaded cleanly ... [3s/12s] OK * checking whether the namespace can be loaded with stated dependencies ... [4s/11s] OK * checking whether the namespace can be unloaded cleanly ... [4s/11s] OK * checking loading without being on the library search path ... OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [31s/87s] OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking examples ... [8s/22s] ERROR Running examples in ‘DeclareDesign-Ex.R’ failed The error most likely occurred in: > ### Name: compare_functions > ### Title: Compare two designs > ### Aliases: compare_functions compare_designs compare_design_code > ### compare_design_summaries compare_design_data compare_design_estimates > ### compare_design_inquiries > > ### ** Examples > > > design1 <- declare_model(N = 100, u = rnorm(N), potential_outcomes(Y ~ Z + u)) + + declare_inquiry(ATE = mean(Y_Z_1 - Y_Z_0)) + + declare_sampling(S = complete_rs(N, n = 75)) + + declare_assignment(Z = complete_ra(N, m = 50)) + + declare_measurement(Y = reveal_outcomes(Y ~ Z)) + + declare_estimator(Y ~ Z, inquiry = "ATE") > > design2 <- declare_model(N = 200, U = rnorm(N), + potential_outcomes(Y ~ 0.5*Z + U)) + + declare_inquiry(ATE = mean(Y_Z_1 - Y_Z_0)) + + declare_sampling(S = complete_rs(N, n = 100)) + + declare_assignment(Z = complete_ra(N, m = 25)) + + declare_measurement(Y = reveal_outcomes(Y ~ Z)) + + declare_estimator(Y ~ Z, .method = lm_robust, inquiry = "ATE") > > compare_designs(design1, design2) Loading required namespace: diffobj Failed with error: ‘there is no package called ‘diffobj’’ Error in fun(design1, design2, format = format, pager = pager, context = context, : requireNamespace("diffobj") is not TRUE Calls: compare_designs -> lapply -> FUN -> fun -> stopifnot Execution halted * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘testthat.R’ [125s/268s] [125s/269s] ERROR 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 > > test_check("DeclareDesign") Error : No estimates or inquiries were declared, so design cannot be simulated. Error : No estimates or inquiries were declared, so design cannot be simulated. Error : No estimates or inquiries were declared, so design cannot be simulated. Error : No estimates or inquiries were declared, so design cannot be simulated. [ FAIL 18 | WARN 0 | SKIP 13 | PASS 467 ] ══ Skipped tests (13) ══════════════════════════════════════════════════════════ • AER cannot be loaded (1): 'test-noncompliance.R:4:3' • DesignLibrary cannot be loaded (3): 'test-design-library.R:5:3', 'test-design-library.R:20:3', 'test-design-library.R:37:3' • Matching cannot be loaded (1): 'test-estimators.R:285:3' • On CRAN (1): 'test-reshape-diagnosis.R:122:3' • Skipped bootstrap SE test for speed (1): 'test-bootstrap-diagnosands.R:43:3' • coin cannot be loaded (1): 'test-test.R:5:3' • data.table cannot be loaded (1): 'test-alternative-df-compatibility.R:52:3' • dplyr cannot be loaded (1): 'test-alternative-df-compatibility.R:18:3' • future.apply cannot be loaded (1): 'test-diagnosands.R:59:3' • reshape2 cannot be loaded (1): 'test-diagnosands.R:176:3' • sf cannot be loaded (1): 'test-alternative-df-compatibility.R:68:3' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-allow-custom-functions.R:1:1'): (code run outside of `test_that()`) ── Error in `library(dplyr)`: there is no package called 'dplyr' Backtrace: ▆ 1. └─base::library(dplyr) at test-allow-custom-functions.R:1:1 ── Error ('test-declare-design.R:33:5'): test the full declare design setup ──── Error: Error in step 4 (): Error in loadNamespace(x): there is no package called 'dplyr' Backtrace: ▆ 1. └─DeclareDesign::draw_data(design) at test-declare-design.R:33:5 2. └─DeclareDesign:::get_function_internal(...) 3. └─DeclareDesign:::run_design_internal.design(...) 4. └─DeclareDesign:::next_step(step, current_df, i) 5. └─base::tryCatch(...) 6. └─base (local) tryCatchList(expr, classes, parentenv, handlers) 7. └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. └─value[[3L]](cond) ── Error ('test-demo.R:119:3'): demo runs ────────────────────────────────────── Error: Error in step 3 (): Error in loadNamespace(x): there is no package called 'dplyr' Backtrace: ▆ 1. └─DeclareDesign::draw_data(design) at test-demo.R:119:3 2. └─DeclareDesign:::get_function_internal(...) 3. └─DeclareDesign:::run_design_internal.design(...) 4. └─DeclareDesign:::next_step(step, current_df, i) 5. └─base::tryCatch(...) 6. └─base (local) tryCatchList(expr, classes, parentenv, handlers) 7. └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. └─value[[3L]](cond) ── Error ('test-design-summary.R:27:3'): Basic design summary ────────────────── Error in `loadNamespace(x)`: there is no package called 'dplyr' Backtrace: ▆ 1. ├─base::summary(design) at test-design-summary.R:27:3 2. ├─DeclareDesign:::summary.design(design) 3. │ └─design[[i]](last_df) 4. │ └─rlang::eval_tidy(...) 5. ├─(FUN)(data = data, ...f = dplyr::mutate, q = 5) 6. ├─dplyr::mutate 7. └─base::loadNamespace(x) 8. └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL) 9. └─base (local) withOneRestart(expr, restarts[[1L]]) 10. └─base (local) doWithOneRestart(return(expr), restart) ── Error ('test-diagnose-design.R:55:3'): default diagnosands work ───────────── Error: Error in step 4 (): Error in loadNamespace(x): there is no package called 'dplyr' Backtrace: ▆ 1. └─DeclareDesign::diagnose_design(...) at test-diagnose-design.R:55:3 2. └─DeclareDesign::simulate_design(!!!dots, sims = sims, future.seed = future.seed) 3. └─base::mapply(...) 4. └─DeclareDesign (local) ``(design = dots[[1L]][[1L]], sims = dots[[2L]][[1L]], future.seed = dots[[3L]][[1L]]) 5. └─DeclareDesign:::future_lapply(...) 6. └─base::lapply(...) 7. └─DeclareDesign (local) FUN(X[[i]], ...) 8. ├─DeclareDesign:::run_design_internal(design) 9. └─DeclareDesign:::run_design_internal.design(design) 10. └─DeclareDesign:::next_step(step, current_df, i) 11. └─base::tryCatch(...) 12. └─base (local) tryCatchList(expr, classes, parentenv, handlers) 13. └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 14. └─value[[3L]](cond) ── Failure ('test-diagnose-design.R:359:3'): diagnose_design can generate and use grouping variables ── dim(tidy(diagnosis)) not equal to c(14, 11). 1/2 mismatches [1] 7 - 14 == -7 ── Error ('test-diagnose-design.R:416:3'): tidy.diagnosis handles NAs ────────── Error in `loadNamespace(x)`: there is no package called 'dplyr' Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-diagnose-design.R:416:3 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object") 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─... %>% dplyr::pull(estimate) 5. └─base::loadNamespace(x) 6. └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL) 7. └─base (local) withOneRestart(expr, restarts[[1L]]) 8. └─base (local) doWithOneRestart(return(expr), restart) ── Error ('test-factorial.R:36:3'): Factorial ────────────────────────────────── Error: Error in step 4 (): Error in loadNamespace(x): there is no package called 'dplyr' Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-factorial.R:36:3 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object") 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─my_design %>% draw_data() %>% nrow() 5. ├─base::nrow(.) 6. └─DeclareDesign::draw_data(.) 7. └─DeclareDesign:::get_function_internal(...) 8. └─DeclareDesign:::run_design_internal.design(...) 9. └─DeclareDesign:::next_step(step, current_df, i) 10. └─base::tryCatch(...) 11. └─base (local) tryCatchList(expr, classes, parentenv, handlers) 12. └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13. └─value[[3L]](cond) ── Error ('test-model.R:199:1'): (code run outside of `test_that()`) ─────────── Error in `library(broom)`: there is no package called 'broom' Backtrace: ▆ 1. └─base::library(broom) at test-model.R:199:1 ── Error ('test-modify-design.R:4:3'): test modify declare design ───────────── Error in `library(dplyr)`: there is no package called 'dplyr' Backtrace: ▆ 1. └─base::library(dplyr) at test-modify-design.R:4:3 ── Error ('test-potential-outcomes.R:77:3'): POs at a higher level ───────────── Error in `library(dplyr)`: there is no package called 'dplyr' Backtrace: ▆ 1. └─base::library(dplyr) at test-potential-outcomes.R:77:3 ── Error ('test-reshape-diagnosis.R:31:3'): reshape works ────────────────────── Error: Error in step 5 (): Error in loadNamespace(x): there is no package called 'dplyr' Backtrace: ▆ 1. └─DeclareDesign::diagnose_design(design, sims = 10, bootstrap_sims = 5) at test-reshape-diagnosis.R:31:3 2. └─DeclareDesign::simulate_design(!!!dots, sims = sims, future.seed = future.seed) 3. └─base::mapply(...) 4. └─DeclareDesign (local) ``(design = dots[[1L]][[1L]], sims = dots[[2L]][[1L]], future.seed = dots[[3L]][[1L]]) 5. └─DeclareDesign:::future_lapply(...) 6. └─base::lapply(...) 7. └─DeclareDesign (local) FUN(X[[i]], ...) 8. ├─DeclareDesign:::run_design_internal(design) 9. └─DeclareDesign:::run_design_internal.design(design) 10. └─DeclareDesign:::next_step(step, current_df, i) 11. └─base::tryCatch(...) 12. └─base (local) tryCatchList(expr, classes, parentenv, handlers) 13. └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 14. └─value[[3L]](cond) ── Error ('test-reshape-diagnosis.R:92:3'): select ───────────────────────────── Error: Error in step 5 (): Error in loadNamespace(x): there is no package called 'dplyr' Backtrace: ▆ 1. └─DeclareDesign::diagnose_design(design, sims = 10, bootstrap_sims = 5) at test-reshape-diagnosis.R:92:3 2. └─DeclareDesign::simulate_design(!!!dots, sims = sims, future.seed = future.seed) 3. └─base::mapply(...) 4. └─DeclareDesign (local) ``(design = dots[[1L]][[1L]], sims = dots[[2L]][[1L]], future.seed = dots[[3L]][[1L]]) 5. └─DeclareDesign:::future_lapply(...) 6. └─base::lapply(...) 7. └─DeclareDesign (local) FUN(X[[i]], ...) 8. ├─DeclareDesign:::run_design_internal(design) 9. └─DeclareDesign:::run_design_internal.design(design) 10. └─DeclareDesign:::next_step(step, current_df, i) 11. └─base::tryCatch(...) 12. └─base (local) tryCatchList(expr, classes, parentenv, handlers) 13. └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 14. └─value[[3L]](cond) ── Failure ('test-sims-independent.R:10:3'): diagnose_design when setting seed they are identical, when not setting seed they are independent ── sims_a$estimand not equal to sims_b$estimand. 10/10 mismatches (average diff: 0.0926) [1] -0.07485 - -0.10762 == 0.03276 [2] 0.06017 - -0.05773 == 0.11789 [3] -0.10128 - -0.03258 == -0.06870 [4] -0.05224 - -0.08412 == 0.03187 [5] 0.04170 - 0.02603 == 0.01567 [6] -0.00384 - -0.10276 == 0.09893 [7] -0.13463 - -0.13197 == -0.00267 [8] -0.29041 - 0.00986 == -0.30028 [9] -0.02717 - -0.09055 == 0.06338 ... ── Failure ('test-sims-independent.R:17:3'): diagnose_design when setting seed they are identical, when not setting seed they are independent ── abs(cor(sims_a$estimand, sims_b$estimand)) is not strictly less than 0.4. Difference: 0.201 ── Failure ('test-sims-independent.R:33:3'): diagnose_design focused on bootstrapping - when setting seed they are identical, when not setting seed they are independent ── sims_a$bootstrap_replicates$mean_estimand not equal to sims_b$bootstrap_replicates$mean_estimand. 5/5 mismatches (average diff: 0.0277) [1] -0.06894 - -0.028784 == -0.0402 [2] -0.04877 - -0.050873 == 0.0021 [3] -0.03300 - -0.000163 == -0.0328 [4] 0.01144 - -0.012128 == 0.0236 [5] -0.00861 - 0.031206 == -0.0398 ── Failure ('test-sims-independent.R:56:3'): simulate_design when setting seed they are identical, when not setting seed they are independent ── sims_a$estimand not equal to sims_b$estimand. 10/10 mismatches (average diff: 0.139) [1] -0.00235 - -0.08320 == 0.0809 [2] 0.00145 - 0.12296 == -0.1215 [3] 0.04563 - -0.13057 == 0.1762 [4] -0.03211 - -0.11605 == 0.0839 [5] 0.13121 - 0.00819 == 0.1230 [6] -0.34551 - -0.09302 == -0.2525 [7] -0.10777 - 0.03399 == -0.1418 [8] 0.07937 - -0.08931 == 0.1687 [9] -0.07399 - 0.15552 == -0.2295 ... ── Failure ('test-subset.R:24:3'): Test Subsetting on default inquiry handler ── design %>% draw_estimands() %>% ... is not TRUE `actual`: FALSE `expected`: TRUE [ FAIL 18 | WARN 0 | SKIP 13 | PASS 467 ] Error: Test failures Execution halted * checking PDF version of manual ... [9s/13s] OK * checking HTML version of manual ... OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * DONE Status: 2 ERRORs, 1 NOTE See ‘/data/gannet/ripley/R/packages/tests-Suggests/DeclareDesign.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 10:37.90, 247.13 + 15.56