Running ‘testthat.R’ [6s/11s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(DesignLibrary)
  Loading required package: DeclareDesign
  Loading required package: randomizr
  Loading required package: fabricatr
  Loading required package: estimatr
  > 
  > test_check(package = "DesignLibrary")
  ── 1. Error: block_cluster_two_arm_designer's default design runs. (@test_design
  No tidy method for objects of class lm_robust
  1: expect_is(DeclareDesign::diagnose_design(one_design, sims = 10, bootstrap_sims = FALSE)$diagnosands_df, 
         "data.frame") at testthat/test_designers.R:35
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: DeclareDesign::diagnose_design(one_design, sims = 10, bootstrap_sims = FALSE)
  5: simulate_design(!!!dots, sims = sims)
  6: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  7: (function (design, sims) 
     {
         if (!is_bare_integerish(sims) || (length(design) != length(sims) & length(sims) != 
             1)) {
             stop("Please provide sims a scalar or a numeric vector of length the number of steps in designs.", 
                 call. = FALSE)
         }
         if (min(sims) < 1) {
             stop("Sims should be >= 1", call. = FALSE)
         }
         if (length(sims) > 1 && sims[1] < 30) {
             warning("We recommend you choose a higher number of simulations than ", sims[1], 
                 " for the top level of simulation.", call. = FALSE)
         }
         if (length(sims) == 1 && is.null(names(sims))) {
             results_list <- future_lapply(seq_len(sims), function(i) run_design(design), 
                 future.seed = NA, future.globals = "design")
         }
         else {
             sims <- check_sims(design, sims)
             results_list <- fan_out(design, sims)
             fan_id <- setNames(lapply(rev(sims$n), seq), paste0("fan_", seq_len(nrow(sims))))
             fan_id <- expand.grid(fan_id)
             fan_id$sim_ID <- seq_len(nrow(fan_id))
         }
         results2x <- function(results_list, what) {
             subresult <- lapply(results_list, `[[`, what)
             df <- do.call(rbind.data.frame, subresult)
             if (nrow(df) == 0) {
                 return(df)
             }
             df <- cbind(sim_ID = rep(seq_along(subresult), vapply(subresult, nrow, 0L)), 
                 df)
         }
         estimates_df <- results2x(results_list, "estimates_df")
         estimands_df <- results2x(results_list, "estimands_df")
         if (is_empty(estimates_df) && is_empty(estimands_df)) {
             stop("No estimates or estimands were declared, so design cannot be simulated.", 
                 call. = FALSE)
         }
         else if (is_empty(estimands_df)) {
             simulations_df <- estimates_df
         }
         else if (is_empty(estimates_df)) {
             simulations_df <- estimands_df
         }
         else {
             simulations_df <- merge(estimands_df, estimates_df, by = colnames(estimands_df) %icn% 
                 estimates_df, all = TRUE, sort = FALSE)
             if (nrow(simulations_df) > max(nrow(estimands_df), nrow(estimates_df))) {
                 warning("Estimators lack estimand/term labels for matching, a many-to-many merge was performed.")
             }
         }
         if (exists("fan_id")) {
             simulations_df <- merge(simulations_df, fan_id, by = "sim_ID")
         }
         if (!is_empty(attr(design, "parameters"))) {
             simulations_df <- data.frame(simulations_df[, 1, drop = FALSE], as_list(attr(design, 
                 "parameters")), simulations_df[, -1, drop = FALSE])
         }
         simulations_df
     })(design = dots[[1L]][[1L]], sims = dots[[2L]][[1L]])
  8: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  9: lapply(...)
  10: FUN(X[[i]], ...)
  11: run_design(design)
  12: run_design_internal(design)
  13: run_design_internal.design(design)
  14: next_step(step, current_df, i)
  15: tryCatch(nxt <- step(current_df), error = function(err) {
         stop(simpleError(sprintf("Error in step %d (%s):\n\t%s", i, attr(step, "label") %||% 
             "", err)))
     })
  16: tryCatchList(expr, classes, parentenv, handlers)
  17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  18: value[[3L]](cond)
  
  ── 2. Error: cluster_sampling_designer's default design runs. (@test_designers.R
  No tidy method for objects of class lm_robust
  1: expect_is(DeclareDesign::diagnose_design(one_design, sims = 10, bootstrap_sims = FALSE)$diagnosands_df, 
         "data.frame") at testthat/test_designers.R:35
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: DeclareDesign::diagnose_design(one_design, sims = 10, bootstrap_sims = FALSE)
  5: simulate_design(!!!dots, sims = sims)
  6: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  7: (function (design, sims) 
     {
         if (!is_bare_integerish(sims) || (length(design) != length(sims) & length(sims) != 
             1)) {
             stop("Please provide sims a scalar or a numeric vector of length the number of steps in designs.", 
                 call. = FALSE)
         }
         if (min(sims) < 1) {
             stop("Sims should be >= 1", call. = FALSE)
         }
         if (length(sims) > 1 && sims[1] < 30) {
             warning("We recommend you choose a higher number of simulations than ", sims[1], 
                 " for the top level of simulation.", call. = FALSE)
         }
         if (length(sims) == 1 && is.null(names(sims))) {
             results_list <- future_lapply(seq_len(sims), function(i) run_design(design), 
                 future.seed = NA, future.globals = "design")
         }
         else {
             sims <- check_sims(design, sims)
             results_list <- fan_out(design, sims)
             fan_id <- setNames(lapply(rev(sims$n), seq), paste0("fan_", seq_len(nrow(sims))))
             fan_id <- expand.grid(fan_id)
             fan_id$sim_ID <- seq_len(nrow(fan_id))
         }
         results2x <- function(results_list, what) {
             subresult <- lapply(results_list, `[[`, what)
             df <- do.call(rbind.data.frame, subresult)
             if (nrow(df) == 0) {
                 return(df)
             }
             df <- cbind(sim_ID = rep(seq_along(subresult), vapply(subresult, nrow, 0L)), 
                 df)
         }
         estimates_df <- results2x(results_list, "estimates_df")
         estimands_df <- results2x(results_list, "estimands_df")
         if (is_empty(estimates_df) && is_empty(estimands_df)) {
             stop("No estimates or estimands were declared, so design cannot be simulated.", 
                 call. = FALSE)
         }
         else if (is_empty(estimands_df)) {
             simulations_df <- estimates_df
         }
         else if (is_empty(estimates_df)) {
             simulations_df <- estimands_df
         }
         else {
             simulations_df <- merge(estimands_df, estimates_df, by = colnames(estimands_df) %icn% 
                 estimates_df, all = TRUE, sort = FALSE)
             if (nrow(simulations_df) > max(nrow(estimands_df), nrow(estimates_df))) {
                 warning("Estimators lack estimand/term labels for matching, a many-to-many merge was performed.")
             }
         }
         if (exists("fan_id")) {
             simulations_df <- merge(simulations_df, fan_id, by = "sim_ID")
         }
         if (!is_empty(attr(design, "parameters"))) {
             simulations_df <- data.frame(simulations_df[, 1, drop = FALSE], as_list(attr(design, 
                 "parameters")), simulations_df[, -1, drop = FALSE])
         }
         simulations_df
     })(design = dots[[1L]][[1L]], sims = dots[[2L]][[1L]])
  8: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  9: lapply(...)
  10: FUN(X[[i]], ...)
  11: run_design(design)
  12: run_design_internal(design)
  13: run_design_internal.design(design)
  14: next_step(step, current_df, i)
  15: tryCatch(nxt <- step(current_df), error = function(err) {
         stop(simpleError(sprintf("Error in step %d (%s):\n\t%s", i, attr(step, "label") %||% 
             "", err)))
     })
  16: tryCatchList(expr, classes, parentenv, handlers)
  17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  18: value[[3L]](cond)
  
  ── 3. Error: mediation_analysis_designer's default design runs. (@test_designers
  No tidy method for objects of class lm_robust
  1: expect_is(DeclareDesign::diagnose_design(one_design, sims = 10, bootstrap_sims = FALSE)$diagnosands_df, 
         "data.frame") at testthat/test_designers.R:35
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: DeclareDesign::diagnose_design(one_design, sims = 10, bootstrap_sims = FALSE)
  5: simulate_design(!!!dots, sims = sims)
  6: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  7: (function (design, sims) 
     {
         if (!is_bare_integerish(sims) || (length(design) != length(sims) & length(sims) != 
             1)) {
             stop("Please provide sims a scalar or a numeric vector of length the number of steps in designs.", 
                 call. = FALSE)
         }
         if (min(sims) < 1) {
             stop("Sims should be >= 1", call. = FALSE)
         }
         if (length(sims) > 1 && sims[1] < 30) {
             warning("We recommend you choose a higher number of simulations than ", sims[1], 
                 " for the top level of simulation.", call. = FALSE)
         }
         if (length(sims) == 1 && is.null(names(sims))) {
             results_list <- future_lapply(seq_len(sims), function(i) run_design(design), 
                 future.seed = NA, future.globals = "design")
         }
         else {
             sims <- check_sims(design, sims)
             results_list <- fan_out(design, sims)
             fan_id <- setNames(lapply(rev(sims$n), seq), paste0("fan_", seq_len(nrow(sims))))
             fan_id <- expand.grid(fan_id)
             fan_id$sim_ID <- seq_len(nrow(fan_id))
         }
         results2x <- function(results_list, what) {
             subresult <- lapply(results_list, `[[`, what)
             df <- do.call(rbind.data.frame, subresult)
             if (nrow(df) == 0) {
                 return(df)
             }
             df <- cbind(sim_ID = rep(seq_along(subresult), vapply(subresult, nrow, 0L)), 
                 df)
         }
         estimates_df <- results2x(results_list, "estimates_df")
         estimands_df <- results2x(results_list, "estimands_df")
         if (is_empty(estimates_df) && is_empty(estimands_df)) {
             stop("No estimates or estimands were declared, so design cannot be simulated.", 
                 call. = FALSE)
         }
         else if (is_empty(estimands_df)) {
             simulations_df <- estimates_df
         }
         else if (is_empty(estimates_df)) {
             simulations_df <- estimands_df
         }
         else {
             simulations_df <- merge(estimands_df, estimates_df, by = colnames(estimands_df) %icn% 
                 estimates_df, all = TRUE, sort = FALSE)
             if (nrow(simulations_df) > max(nrow(estimands_df), nrow(estimates_df))) {
                 warning("Estimators lack estimand/term labels for matching, a many-to-many merge was performed.")
             }
         }
         if (exists("fan_id")) {
             simulations_df <- merge(simulations_df, fan_id, by = "sim_ID")
         }
         if (!is_empty(attr(design, "parameters"))) {
             simulations_df <- data.frame(simulations_df[, 1, drop = FALSE], as_list(attr(design, 
                 "parameters")), simulations_df[, -1, drop = FALSE])
         }
         simulations_df
     })(design = dots[[1L]][[1L]], sims = dots[[2L]][[1L]])
  8: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  9: lapply(...)
  10: FUN(X[[i]], ...)
  11: run_design(design)
  12: run_design_internal(design)
  13: run_design_internal.design(design)
  14: next_step(step, current_df, i)
  15: tryCatch(nxt <- step(current_df), error = function(err) {
         stop(simpleError(sprintf("Error in step %d (%s):\n\t%s", i, attr(step, "label") %||% 
             "", err)))
     })
  16: tryCatchList(expr, classes, parentenv, handlers)
  17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  18: value[[3L]](cond)
  
  ── 4. Error: pretest_posttest_designer's default design runs. (@test_designers.R
  No tidy method for objects of class lm_robust
  1: expect_is(DeclareDesign::diagnose_design(one_design, sims = 10, bootstrap_sims = FALSE)$diagnosands_df, 
         "data.frame") at testthat/test_designers.R:35
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: DeclareDesign::diagnose_design(one_design, sims = 10, bootstrap_sims = FALSE)
  5: simulate_design(!!!dots, sims = sims)
  6: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  7: (function (design, sims) 
     {
         if (!is_bare_integerish(sims) || (length(design) != length(sims) & length(sims) != 
             1)) {
             stop("Please provide sims a scalar or a numeric vector of length the number of steps in designs.", 
                 call. = FALSE)
         }
         if (min(sims) < 1) {
             stop("Sims should be >= 1", call. = FALSE)
         }
         if (length(sims) > 1 && sims[1] < 30) {
             warning("We recommend you choose a higher number of simulations than ", sims[1], 
                 " for the top level of simulation.", call. = FALSE)
         }
         if (length(sims) == 1 && is.null(names(sims))) {
             results_list <- future_lapply(seq_len(sims), function(i) run_design(design), 
                 future.seed = NA, future.globals = "design")
         }
         else {
             sims <- check_sims(design, sims)
             results_list <- fan_out(design, sims)
             fan_id <- setNames(lapply(rev(sims$n), seq), paste0("fan_", seq_len(nrow(sims))))
             fan_id <- expand.grid(fan_id)
             fan_id$sim_ID <- seq_len(nrow(fan_id))
         }
         results2x <- function(results_list, what) {
             subresult <- lapply(results_list, `[[`, what)
             df <- do.call(rbind.data.frame, subresult)
             if (nrow(df) == 0) {
                 return(df)
             }
             df <- cbind(sim_ID = rep(seq_along(subresult), vapply(subresult, nrow, 0L)), 
                 df)
         }
         estimates_df <- results2x(results_list, "estimates_df")
         estimands_df <- results2x(results_list, "estimands_df")
         if (is_empty(estimates_df) && is_empty(estimands_df)) {
             stop("No estimates or estimands were declared, so design cannot be simulated.", 
                 call. = FALSE)
         }
         else if (is_empty(estimands_df)) {
             simulations_df <- estimates_df
         }
         else if (is_empty(estimates_df)) {
             simulations_df <- estimands_df
         }
         else {
             simulations_df <- merge(estimands_df, estimates_df, by = colnames(estimands_df) %icn% 
                 estimates_df, all = TRUE, sort = FALSE)
             if (nrow(simulations_df) > max(nrow(estimands_df), nrow(estimates_df))) {
                 warning("Estimators lack estimand/term labels for matching, a many-to-many merge was performed.")
             }
         }
         if (exists("fan_id")) {
             simulations_df <- merge(simulations_df, fan_id, by = "sim_ID")
         }
         if (!is_empty(attr(design, "parameters"))) {
             simulations_df <- data.frame(simulations_df[, 1, drop = FALSE], as_list(attr(design, 
                 "parameters")), simulations_df[, -1, drop = FALSE])
         }
         simulations_df
     })(design = dots[[1L]][[1L]], sims = dots[[2L]][[1L]])
  8: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  9: lapply(...)
  10: FUN(X[[i]], ...)
  11: run_design(design)
  12: run_design_internal(design)
  13: run_design_internal.design(design)
  14: next_step(step, current_df, i)
  15: tryCatch(nxt <- step(current_df), error = function(err) {
         stop(simpleError(sprintf("Error in step %d (%s):\n\t%s", i, attr(step, "label") %||% 
             "", err)))
     })
  16: tryCatchList(expr, classes, parentenv, handlers)
  17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  18: value[[3L]](cond)
  
  ── 5. Error: regression_discontinuity_designer's default design runs. (@test_des
  No tidy method for objects of class lm_robust
  1: expect_is(DeclareDesign::diagnose_design(one_design, sims = 10, bootstrap_sims = FALSE)$diagnosands_df, 
         "data.frame") at testthat/test_designers.R:35
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: DeclareDesign::diagnose_design(one_design, sims = 10, bootstrap_sims = FALSE)
  5: simulate_design(!!!dots, sims = sims)
  6: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  7: (function (design, sims) 
     {
         if (!is_bare_integerish(sims) || (length(design) != length(sims) & length(sims) != 
             1)) {
             stop("Please provide sims a scalar or a numeric vector of length the number of steps in designs.", 
                 call. = FALSE)
         }
         if (min(sims) < 1) {
             stop("Sims should be >= 1", call. = FALSE)
         }
         if (length(sims) > 1 && sims[1] < 30) {
             warning("We recommend you choose a higher number of simulations than ", sims[1], 
                 " for the top level of simulation.", call. = FALSE)
         }
         if (length(sims) == 1 && is.null(names(sims))) {
             results_list <- future_lapply(seq_len(sims), function(i) run_design(design), 
                 future.seed = NA, future.globals = "design")
         }
         else {
             sims <- check_sims(design, sims)
             results_list <- fan_out(design, sims)
             fan_id <- setNames(lapply(rev(sims$n), seq), paste0("fan_", seq_len(nrow(sims))))
             fan_id <- expand.grid(fan_id)
             fan_id$sim_ID <- seq_len(nrow(fan_id))
         }
         results2x <- function(results_list, what) {
             subresult <- lapply(results_list, `[[`, what)
             df <- do.call(rbind.data.frame, subresult)
             if (nrow(df) == 0) {
                 return(df)
             }
             df <- cbind(sim_ID = rep(seq_along(subresult), vapply(subresult, nrow, 0L)), 
                 df)
         }
         estimates_df <- results2x(results_list, "estimates_df")
         estimands_df <- results2x(results_list, "estimands_df")
         if (is_empty(estimates_df) && is_empty(estimands_df)) {
             stop("No estimates or estimands were declared, so design cannot be simulated.", 
                 call. = FALSE)
         }
         else if (is_empty(estimands_df)) {
             simulations_df <- estimates_df
         }
         else if (is_empty(estimates_df)) {
             simulations_df <- estimands_df
         }
         else {
             simulations_df <- merge(estimands_df, estimates_df, by = colnames(estimands_df) %icn% 
                 estimates_df, all = TRUE, sort = FALSE)
             if (nrow(simulations_df) > max(nrow(estimands_df), nrow(estimates_df))) {
                 warning("Estimators lack estimand/term labels for matching, a many-to-many merge was performed.")
             }
         }
         if (exists("fan_id")) {
             simulations_df <- merge(simulations_df, fan_id, by = "sim_ID")
         }
         if (!is_empty(attr(design, "parameters"))) {
             simulations_df <- data.frame(simulations_df[, 1, drop = FALSE], as_list(attr(design, 
                 "parameters")), simulations_df[, -1, drop = FALSE])
         }
         simulations_df
     })(design = dots[[1L]][[1L]], sims = dots[[2L]][[1L]])
  8: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  9: lapply(...)
  10: FUN(X[[i]], ...)
  11: run_design(design)
  12: run_design_internal(design)
  13: run_design_internal.design(design)
  14: next_step(step, current_df, i)
  15: tryCatch(nxt <- step(current_df), error = function(err) {
         stop(simpleError(sprintf("Error in step %d (%s):\n\t%s", i, attr(step, "label") %||% 
             "", err)))
     })
  16: tryCatchList(expr, classes, parentenv, handlers)
  17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  18: value[[3L]](cond)
  
  ── 6. Error: simple_factorial_designer's default design runs. (@test_designers.R
  No tidy method for objects of class lm_robust
  1: expect_is(DeclareDesign::diagnose_design(one_design, sims = 10, bootstrap_sims = FALSE)$diagnosands_df, 
         "data.frame") at testthat/test_designers.R:35
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: DeclareDesign::diagnose_design(one_design, sims = 10, bootstrap_sims = FALSE)
  5: simulate_design(!!!dots, sims = sims)
  6: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  7: (function (design, sims) 
     {
         if (!is_bare_integerish(sims) || (length(design) != length(sims) & length(sims) != 
             1)) {
             stop("Please provide sims a scalar or a numeric vector of length the number of steps in designs.", 
                 call. = FALSE)
         }
         if (min(sims) < 1) {
             stop("Sims should be >= 1", call. = FALSE)
         }
         if (length(sims) > 1 && sims[1] < 30) {
             warning("We recommend you choose a higher number of simulations than ", sims[1], 
                 " for the top level of simulation.", call. = FALSE)
         }
         if (length(sims) == 1 && is.null(names(sims))) {
             results_list <- future_lapply(seq_len(sims), function(i) run_design(design), 
                 future.seed = NA, future.globals = "design")
         }
         else {
             sims <- check_sims(design, sims)
             results_list <- fan_out(design, sims)
             fan_id <- setNames(lapply(rev(sims$n), seq), paste0("fan_", seq_len(nrow(sims))))
             fan_id <- expand.grid(fan_id)
             fan_id$sim_ID <- seq_len(nrow(fan_id))
         }
         results2x <- function(results_list, what) {
             subresult <- lapply(results_list, `[[`, what)
             df <- do.call(rbind.data.frame, subresult)
             if (nrow(df) == 0) {
                 return(df)
             }
             df <- cbind(sim_ID = rep(seq_along(subresult), vapply(subresult, nrow, 0L)), 
                 df)
         }
         estimates_df <- results2x(results_list, "estimates_df")
         estimands_df <- results2x(results_list, "estimands_df")
         if (is_empty(estimates_df) && is_empty(estimands_df)) {
             stop("No estimates or estimands were declared, so design cannot be simulated.", 
                 call. = FALSE)
         }
         else if (is_empty(estimands_df)) {
             simulations_df <- estimates_df
         }
         else if (is_empty(estimates_df)) {
             simulations_df <- estimands_df
         }
         else {
             simulations_df <- merge(estimands_df, estimates_df, by = colnames(estimands_df) %icn% 
                 estimates_df, all = TRUE, sort = FALSE)
             if (nrow(simulations_df) > max(nrow(estimands_df), nrow(estimates_df))) {
                 warning("Estimators lack estimand/term labels for matching, a many-to-many merge was performed.")
             }
         }
         if (exists("fan_id")) {
             simulations_df <- merge(simulations_df, fan_id, by = "sim_ID")
         }
         if (!is_empty(attr(design, "parameters"))) {
             simulations_df <- data.frame(simulations_df[, 1, drop = FALSE], as_list(attr(design, 
                 "parameters")), simulations_df[, -1, drop = FALSE])
         }
         simulations_df
     })(design = dots[[1L]][[1L]], sims = dots[[2L]][[1L]])
  8: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  9: lapply(...)
  10: FUN(X[[i]], ...)
  11: run_design(design)
  12: run_design_internal(design)
  13: run_design_internal.design(design)
  14: next_step(step, current_df, i)
  15: tryCatch(nxt <- step(current_df), error = function(err) {
         stop(simpleError(sprintf("Error in step %d (%s):\n\t%s", i, attr(step, "label") %||% 
             "", err)))
     })
  16: tryCatchList(expr, classes, parentenv, handlers)
  17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  18: value[[3L]](cond)
  
  ── 7. Error: simple_spillover_designer's default design runs. (@test_designers.R
  No tidy method for objects of class lm_robust
  1: expect_is(DeclareDesign::diagnose_design(one_design, sims = 10, bootstrap_sims = FALSE)$diagnosands_df, 
         "data.frame") at testthat/test_designers.R:35
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: DeclareDesign::diagnose_design(one_design, sims = 10, bootstrap_sims = FALSE)
  5: simulate_design(!!!dots, sims = sims)
  6: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  7: (function (design, sims) 
     {
         if (!is_bare_integerish(sims) || (length(design) != length(sims) & length(sims) != 
             1)) {
             stop("Please provide sims a scalar or a numeric vector of length the number of steps in designs.", 
                 call. = FALSE)
         }
         if (min(sims) < 1) {
             stop("Sims should be >= 1", call. = FALSE)
         }
         if (length(sims) > 1 && sims[1] < 30) {
             warning("We recommend you choose a higher number of simulations than ", sims[1], 
                 " for the top level of simulation.", call. = FALSE)
         }
         if (length(sims) == 1 && is.null(names(sims))) {
             results_list <- future_lapply(seq_len(sims), function(i) run_design(design), 
                 future.seed = NA, future.globals = "design")
         }
         else {
             sims <- check_sims(design, sims)
             results_list <- fan_out(design, sims)
             fan_id <- setNames(lapply(rev(sims$n), seq), paste0("fan_", seq_len(nrow(sims))))
             fan_id <- expand.grid(fan_id)
             fan_id$sim_ID <- seq_len(nrow(fan_id))
         }
         results2x <- function(results_list, what) {
             subresult <- lapply(results_list, `[[`, what)
             df <- do.call(rbind.data.frame, subresult)
             if (nrow(df) == 0) {
                 return(df)
             }
             df <- cbind(sim_ID = rep(seq_along(subresult), vapply(subresult, nrow, 0L)), 
                 df)
         }
         estimates_df <- results2x(results_list, "estimates_df")
         estimands_df <- results2x(results_list, "estimands_df")
         if (is_empty(estimates_df) && is_empty(estimands_df)) {
             stop("No estimates or estimands were declared, so design cannot be simulated.", 
                 call. = FALSE)
         }
         else if (is_empty(estimands_df)) {
             simulations_df <- estimates_df
         }
         else if (is_empty(estimates_df)) {
             simulations_df <- estimands_df
         }
         else {
             simulations_df <- merge(estimands_df, estimates_df, by = colnames(estimands_df) %icn% 
                 estimates_df, all = TRUE, sort = FALSE)
             if (nrow(simulations_df) > max(nrow(estimands_df), nrow(estimates_df))) {
                 warning("Estimators lack estimand/term labels for matching, a many-to-many merge was performed.")
             }
         }
         if (exists("fan_id")) {
             simulations_df <- merge(simulations_df, fan_id, by = "sim_ID")
         }
         if (!is_empty(attr(design, "parameters"))) {
             simulations_df <- data.frame(simulations_df[, 1, drop = FALSE], as_list(attr(design, 
                 "parameters")), simulations_df[, -1, drop = FALSE])
         }
         simulations_df
     })(design = dots[[1L]][[1L]], sims = dots[[2L]][[1L]])
  8: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  9: lapply(...)
  10: FUN(X[[i]], ...)
  11: run_design(design)
  12: run_design_internal(design)
  13: run_design_internal.design(design)
  14: next_step(step, current_df, i)
  15: tryCatch(nxt <- step(current_df), error = function(err) {
         stop(simpleError(sprintf("Error in step %d (%s):\n\t%s", i, attr(step, "label") %||% 
             "", err)))
     })
  16: tryCatchList(expr, classes, parentenv, handlers)
  17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  18: value[[3L]](cond)
  
  ── 8. Error: simple_two_arm_designer's default design runs. (@test_designers.R#3
  No tidy method for objects of class difference_in_means
  1: expect_is(DeclareDesign::diagnose_design(one_design, sims = 10, bootstrap_sims = FALSE)$diagnosands_df, 
         "data.frame") at testthat/test_designers.R:35
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: DeclareDesign::diagnose_design(one_design, sims = 10, bootstrap_sims = FALSE)
  5: simulate_design(!!!dots, sims = sims)
  6: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  7: (function (design, sims) 
     {
         if (!is_bare_integerish(sims) || (length(design) != length(sims) & length(sims) != 
             1)) {
             stop("Please provide sims a scalar or a numeric vector of length the number of steps in designs.", 
                 call. = FALSE)
         }
         if (min(sims) < 1) {
             stop("Sims should be >= 1", call. = FALSE)
         }
         if (length(sims) > 1 && sims[1] < 30) {
             warning("We recommend you choose a higher number of simulations than ", sims[1], 
                 " for the top level of simulation.", call. = FALSE)
         }
         if (length(sims) == 1 && is.null(names(sims))) {
             results_list <- future_lapply(seq_len(sims), function(i) run_design(design), 
                 future.seed = NA, future.globals = "design")
         }
         else {
             sims <- check_sims(design, sims)
             results_list <- fan_out(design, sims)
             fan_id <- setNames(lapply(rev(sims$n), seq), paste0("fan_", seq_len(nrow(sims))))
             fan_id <- expand.grid(fan_id)
             fan_id$sim_ID <- seq_len(nrow(fan_id))
         }
         results2x <- function(results_list, what) {
             subresult <- lapply(results_list, `[[`, what)
             df <- do.call(rbind.data.frame, subresult)
             if (nrow(df) == 0) {
                 return(df)
             }
             df <- cbind(sim_ID = rep(seq_along(subresult), vapply(subresult, nrow, 0L)), 
                 df)
         }
         estimates_df <- results2x(results_list, "estimates_df")
         estimands_df <- results2x(results_list, "estimands_df")
         if (is_empty(estimates_df) && is_empty(estimands_df)) {
             stop("No estimates or estimands were declared, so design cannot be simulated.", 
                 call. = FALSE)
         }
         else if (is_empty(estimands_df)) {
             simulations_df <- estimates_df
         }
         else if (is_empty(estimates_df)) {
             simulations_df <- estimands_df
         }
         else {
             simulations_df <- merge(estimands_df, estimates_df, by = colnames(estimands_df) %icn% 
                 estimates_df, all = TRUE, sort = FALSE)
             if (nrow(simulations_df) > max(nrow(estimands_df), nrow(estimates_df))) {
                 warning("Estimators lack estimand/term labels for matching, a many-to-many merge was performed.")
             }
         }
         if (exists("fan_id")) {
             simulations_df <- merge(simulations_df, fan_id, by = "sim_ID")
         }
         if (!is_empty(attr(design, "parameters"))) {
             simulations_df <- data.frame(simulations_df[, 1, drop = FALSE], as_list(attr(design, 
                 "parameters")), simulations_df[, -1, drop = FALSE])
         }
         simulations_df
     })(design = dots[[1L]][[1L]], sims = dots[[2L]][[1L]])
  8: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  9: lapply(...)
  10: FUN(X[[i]], ...)
  11: run_design(design)
  12: run_design_internal(design)
  13: run_design_internal.design(design)
  14: next_step(step, current_df, i)
  15: tryCatch(nxt <- step(current_df), error = function(err) {
         stop(simpleError(sprintf("Error in step %d (%s):\n\t%s", i, attr(step, "label") %||% 
             "", err)))
     })
  16: tryCatchList(expr, classes, parentenv, handlers)
  17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  18: value[[3L]](cond)
  
  ── 9. Error: two_arm_attrition_designer's default design runs. (@test_designers.
  No tidy method for objects of class difference_in_means
  1: expect_is(DeclareDesign::diagnose_design(one_design, sims = 10, bootstrap_sims = FALSE)$diagnosands_df, 
         "data.frame") at testthat/test_designers.R:35
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: DeclareDesign::diagnose_design(one_design, sims = 10, bootstrap_sims = FALSE)
  5: simulate_design(!!!dots, sims = sims)
  6: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  7: (function (design, sims) 
     {
         if (!is_bare_integerish(sims) || (length(design) != length(sims) & length(sims) != 
             1)) {
             stop("Please provide sims a scalar or a numeric vector of length the number of steps in designs.", 
                 call. = FALSE)
         }
         if (min(sims) < 1) {
             stop("Sims should be >= 1", call. = FALSE)
         }
         if (length(sims) > 1 && sims[1] < 30) {
             warning("We recommend you choose a higher number of simulations than ", sims[1], 
                 " for the top level of simulation.", call. = FALSE)
         }
         if (length(sims) == 1 && is.null(names(sims))) {
             results_list <- future_lapply(seq_len(sims), function(i) run_design(design), 
                 future.seed = NA, future.globals = "design")
         }
         else {
             sims <- check_sims(design, sims)
             results_list <- fan_out(design, sims)
             fan_id <- setNames(lapply(rev(sims$n), seq), paste0("fan_", seq_len(nrow(sims))))
             fan_id <- expand.grid(fan_id)
             fan_id$sim_ID <- seq_len(nrow(fan_id))
         }
         results2x <- function(results_list, what) {
             subresult <- lapply(results_list, `[[`, what)
             df <- do.call(rbind.data.frame, subresult)
             if (nrow(df) == 0) {
                 return(df)
             }
             df <- cbind(sim_ID = rep(seq_along(subresult), vapply(subresult, nrow, 0L)), 
                 df)
         }
         estimates_df <- results2x(results_list, "estimates_df")
         estimands_df <- results2x(results_list, "estimands_df")
         if (is_empty(estimates_df) && is_empty(estimands_df)) {
             stop("No estimates or estimands were declared, so design cannot be simulated.", 
                 call. = FALSE)
         }
         else if (is_empty(estimands_df)) {
             simulations_df <- estimates_df
         }
         else if (is_empty(estimates_df)) {
             simulations_df <- estimands_df
         }
         else {
             simulations_df <- merge(estimands_df, estimates_df, by = colnames(estimands_df) %icn% 
                 estimates_df, all = TRUE, sort = FALSE)
             if (nrow(simulations_df) > max(nrow(estimands_df), nrow(estimates_df))) {
                 warning("Estimators lack estimand/term labels for matching, a many-to-many merge was performed.")
             }
         }
         if (exists("fan_id")) {
             simulations_df <- merge(simulations_df, fan_id, by = "sim_ID")
         }
         if (!is_empty(attr(design, "parameters"))) {
             simulations_df <- data.frame(simulations_df[, 1, drop = FALSE], as_list(attr(design, 
                 "parameters")), simulations_df[, -1, drop = FALSE])
         }
         simulations_df
     })(design = dots[[1L]][[1L]], sims = dots[[2L]][[1L]])
  8: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  9: lapply(...)
  10: FUN(X[[i]], ...)
  11: run_design(design)
  12: run_design_internal(design)
  13: run_design_internal.design(design)
  14: next_step(step, current_df, i)
  15: tryCatch(nxt <- step(current_df), error = function(err) {
         stop(simpleError(sprintf("Error in step %d (%s):\n\t%s", i, attr(step, "label") %||% 
             "", err)))
     })
  16: tryCatchList(expr, classes, parentenv, handlers)
  17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  18: value[[3L]](cond)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 138 SKIPPED: 0 FAILED: 9
  1. Error: block_cluster_two_arm_designer's default design runs. (@test_designers.R#35) 
  2. Error: cluster_sampling_designer's default design runs. (@test_designers.R#35) 
  3. Error: mediation_analysis_designer's default design runs. (@test_designers.R#35) 
  4. Error: pretest_posttest_designer's default design runs. (@test_designers.R#35) 
  5. Error: regression_discontinuity_designer's default design runs. (@test_designers.R#35) 
  6. Error: simple_factorial_designer's default design runs. (@test_designers.R#35) 
  7. Error: simple_spillover_designer's default design runs. (@test_designers.R#35) 
  8. Error: simple_two_arm_designer's default design runs. (@test_designers.R#35) 
  9. Error: two_arm_attrition_designer's default design runs. (@test_designers.R#35) 
  
  Error: testthat unit tests failed
  Execution halted