Running ‘testthat.R’ [16s/21s]
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")
  ── 1. Error: (unknown) (@test-allow-custom-functions.R#1)  ─────────────────────
  there is no package called 'dplyr'
  1: library(dplyr) at testthat/test-allow-custom-functions.R:1
  2: stop(txt, domain = NA)
  
  ── 2. Error: test diagnosands (@test-bootstrap-diagnosands.R#32)  ──────────────
  'names' attribute [6] must be the same length as the vector [5]
  1: diagnose_design(my_design, sims = 2, bootstrap_sims = 2) at testthat/test-bootstrap-diagnosands.R:32
  2: simulate_design(!!!dots, sims = sims)
  3: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  4: (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]])
  5: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  6: future.apply::future_lapply(..., future.seed = future.seed, future.globals = future.globals)
  7: values(fs)
  8: values.list(fs)
  9: value(tmp, ...)
  10: value.Future(tmp, ...)
  11: resignalCondition(future)
  
  ── 3. Error: compare_designs works (@test-compare-designs.R#33)  ───────────────
  'names' attribute [6] must be the same length as the vector [5]
  1: diagnose_design(my_design_1, sims = 2, bootstrap_sims = FALSE) at testthat/test-compare-designs.R:33
  2: simulate_design(!!!dots, sims = sims)
  3: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  4: (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]])
  5: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  6: future.apply::future_lapply(..., future.seed = future.seed, future.globals = future.globals)
  7: values(fs)
  8: values.list(fs)
  9: value(tmp, ...)
  10: value.Future(tmp, ...)
  11: resignalCondition(future)
  
  ── 4. Error: test the custom execution strategy (@test-conduct-custom.R#20)  ───
  'names' attribute [6] must be the same length as the vector [5]
  1: run_design(design) at testthat/test-conduct-custom.R:20
  2: run_design_internal(design)
  3: run_design_internal.design(design)
  4: next_step(step, current_df, i)
  5: tryCatch(nxt <- step(current_df), error = function(err) {
         stop(simpleError(sprintf("Error in step %d (%s):\n\t%s", i, attr(step, "label") %||% 
             "", err)))
     })
  6: tryCatchList(expr, classes, parentenv, handlers)
  7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  8: value[[3L]](cond)
  
  ── 5. Error: test the full declare design setup (@test-declare-design.R#33)  ───
  there is no package called 'dplyr'
  1: draw_data(design) at testthat/test-declare-design.R:33
  2: run_design_internal(design, results = list(current_df = 0))
  3: run_design_internal.design(design, results = list(current_df = 0))
  4: next_step(step, current_df, i)
  5: tryCatch(nxt <- step(current_df), error = function(err) {
         stop(simpleError(sprintf("Error in step %d (%s):\n\t%s", i, attr(step, "label") %||% 
             "", err)))
     })
  6: tryCatchList(expr, classes, parentenv, handlers)
  7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  8: value[[3L]](cond)
  
  ── 6. Error: demo runs (@test-demo.R#96)  ──────────────────────────────────────
  'names' attribute [6] must be the same length as the vector [5]
  1: my_estimator_dim(smp) at testthat/test-demo.R:96
  2: eval_tidy(quo, data = list(data = data))
  3: (FUN)(data = data, ~(Y ~ Z), estimand = ~my_estimand, label = ~"estimator")
  4: eval_tidy(quo(estimator_function(data, !!!dots)))
  5: estimator_function(data, ~(Y ~ Z))
  6: fit2tidy(results, coefficient_names)
  7: `colnames<-`(`*tmp*`, value = c("term", "estimate", "std.error", "p.value", "conf.low", 
         "conf.high"))
  
  ── 7. Error: Basic design summary (@test-design-summary.R#27)  ─────────────────
  there is no package called 'dplyr'
  1: summary(design) at testthat/test-design-summary.R:27
  2: summary.design(design)
  3: design[[i]](last_df)
  4: eval_tidy(quo, data = list(data = data))
  5: (FUN)(data = data, ...f = ~dplyr::mutate, q = ~5)
  6: ~dplyr::mutate
  7: dplyr::mutate
  8: getExportedValue(pkg, name)
  9: asNamespace(ns)
  10: getNamespace(ns)
  11: loadNamespace(name)
  12: withRestarts(stop(cond), retry_loadNamespace = function() NULL)
  13: withOneRestart(expr, restarts[[1L]])
  14: doWithOneRestart(return(expr), restart)
  
  ── 8. Error: summary, estimator formula print formula (@test-design-summary.R#82
  'names' attribute [6] must be the same length as the vector [5]
  1: expect_output(print(d), "extra ~ group") at testthat/test-design-summary.R:82
  2: quasi_capture(enquo(object), capture_output, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: capture_output_lines(code, print, width = width)
  5: eval_with_output(code, print = print, width = width)
  6: withr::with_output_sink(temp, withVisible(code))
  7: force(code)
  8: withVisible(code)
  9: eval_bare(get_expr(quo), get_env(quo))
  10: print(d)
  11: print.design(d)
  12: print(summary(x, verbose = verbose, ... = ...))
  13: summary(x, verbose = verbose, ... = ...)
  14: summary.design(x, verbose = verbose, ... = ...)
  15: design[[i]](current_df)
  16: eval_tidy(quo, data = list(data = data))
  17: (FUN)(data = data, ~(extra ~ group), label = ~"estimator")
  18: eval_tidy(quo(estimator_function(data, !!!dots)))
  19: estimator_function(data, ~(extra ~ group))
  20: fit2tidy(results, coefficient_names)
  21: `colnames<-`(`*tmp*`, value = c("term", "estimate", "std.error", "p.value", "conf.low", 
         "conf.high"))
  
  ── 9. Error: summary, estimator print model (@test-design-summary.R#87)  ───────
  'names' attribute [6] must be the same length as the vector [5]
  1: expect_output(print(d), "Model:\\s*lm") at testthat/test-design-summary.R:87
  2: quasi_capture(enquo(object), capture_output, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: capture_output_lines(code, print, width = width)
  5: eval_with_output(code, print = print, width = width)
  6: withr::with_output_sink(temp, withVisible(code))
  7: force(code)
  8: withVisible(code)
  9: eval_bare(get_expr(quo), get_env(quo))
  10: print(d)
  11: print.design(d)
  12: print(summary(x, verbose = verbose, ... = ...))
  13: summary(x, verbose = verbose, ... = ...)
  14: summary.design(x, verbose = verbose, ... = ...)
  15: design[[i]](current_df)
  16: eval_tidy(quo, data = list(data = data))
  17: (FUN)(data = data, ~(extra ~ group), model = ~lm, label = ~"estimator")
  18: eval_tidy(quo(estimator_function(data, !!!dots)))
  19: estimator_function(data, ~(extra ~ group), model = ~lm)
  20: fit2tidy(results, coefficient_names)
  21: `colnames<-`(`*tmp*`, value = c("term", "estimate", "std.error", "p.value", "conf.low", 
         "conf.high"))
  
  ── 10. Error: s3 dispatch works (@test-diagnosands.R#33)  ──────────────────────
  'names' attribute [6] must be the same length as the vector [5]
  1: diagnose_design(my_design, sims = 5, bootstrap_sims = FALSE) at testthat/test-diagnosands.R:33
  2: simulate_design(!!!dots, sims = sims)
  3: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  4: (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]])
  5: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  6: future.apply::future_lapply(..., future.seed = future.seed, future.globals = future.globals)
  7: values(fs)
  8: values.list(fs)
  9: value(tmp, ...)
  10: value.Future(tmp, ...)
  11: resignalCondition(future)
  
  ── 11. Error: Diagnosis prints ok (@test-diagnosands.R#74)  ────────────────────
  'names' attribute [6] must be the same length as the vector [5]
  1: diagnose_design(my_design, sims = 2, bootstrap_sims = FALSE) at testthat/test-diagnosands.R:74
  2: simulate_design(!!!dots, sims = sims)
  3: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  4: (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]])
  5: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  6: future.apply::future_lapply(..., future.seed = future.seed, future.globals = future.globals)
  7: values(fs)
  8: values.list(fs)
  9: value(tmp, ...)
  10: value.Future(tmp, ...)
  11: resignalCondition(future)
  
  ── 12. Error: test diagnosands without estimands (@test-diagnosands.R#90)  ─────
  'names' attribute [6] must be the same length as the vector [5]
  1: diagnose_design(my_design2, sims = 2, diagnosands = my_dig, bootstrap_sims = FALSE) at testthat/test-diagnosands.R:90
  2: simulate_design(!!!dots, sims = sims)
  3: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  4: (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]])
  5: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  6: future.apply::future_lapply(..., future.seed = future.seed, future.globals = future.globals)
  7: values(fs)
  8: values.list(fs)
  9: value(tmp, ...)
  10: value.Future(tmp, ...)
  11: resignalCondition(future)
  
  ── 13. Error: custom diagnosand function (@test-diagnosands.R#103)  ────────────
  'names' attribute [6] must be the same length as the vector [5]
  1: diagnose_design(my_design, sims = 2, diagnosands = my_dig, bootstrap_sims = FALSE) at testthat/test-diagnosands.R:103
  2: simulate_design(!!!dots, sims = sims)
  3: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  4: (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]])
  5: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  6: future.apply::future_lapply(..., future.seed = future.seed, future.globals = future.globals)
  7: values(fs)
  8: values.list(fs)
  9: value(tmp, ...)
  10: value.Future(tmp, ...)
  11: resignalCondition(future)
  
  ── 14. Error: single diagnosand function (@test-diagnosands.R#115)  ────────────
  'names' attribute [6] must be the same length as the vector [5]
  1: diagnose_design(my_design, sims = 2, diagnosands = my_one_dig, bootstrap_sims = 5) at testthat/test-diagnosands.R:115
  2: simulate_design(!!!dots, sims = sims)
  3: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  4: (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]])
  5: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  6: future.apply::future_lapply(..., future.seed = future.seed, future.globals = future.globals)
  7: values(fs)
  8: values.list(fs)
  9: value(tmp, ...)
  10: value.Future(tmp, ...)
  11: resignalCondition(future)
  
  ── 15. Error: diagnosis, list of designs (@test-diagnosands.R#142)  ────────────
  'names' attribute [6] must be the same length as the vector [5]
  1: diagnose_design(list(d, d), diagnosands = diagnosand, sims = 5, bootstrap_sims = FALSE) at testthat/test-diagnosands.R:142
  2: simulate_design(!!!dots, sims = sims)
  3: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  4: (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]])
  5: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  6: future.apply::future_lapply(..., future.seed = future.seed, future.globals = future.globals)
  7: values(fs)
  8: values.list(fs)
  9: value(tmp, ...)
  10: value.Future(tmp, ...)
  11: resignalCondition(future)
  
  ── 16. Error: diagnosis, unlinked estimator (@test-diagnosands.R#153)  ─────────
  'names' attribute [6] must be the same length as the vector [5]
  1: expect_warning(diagnose_design(d, sims = 5, bootstrap_sims = FALSE), "Estimators lack estimand/term labels for matching, a many-to-many merge was performed.") at testthat/test-diagnosands.R:153
  2: quasi_capture(enquo(object), capture_warnings, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withCallingHandlers(code, warning = function(condition) {
         out$push(condition)
         invokeRestart("muffleWarning")
     })
  5: eval_bare(get_expr(quo), get_env(quo))
  6: diagnose_design(d, sims = 5, bootstrap_sims = FALSE)
  7: simulate_design(!!!dots, sims = sims)
  8: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  9: (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]])
  10: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  11: future.apply::future_lapply(..., future.seed = future.seed, future.globals = future.globals)
  12: values(fs)
  13: values.list(fs)
  14: value(tmp, ...)
  15: value.Future(tmp, ...)
  16: resignalCondition(future)
  
  ── 17. Error: diagnosis, NAs if no estimand (@test-diagnosands.R#226)  ─────────
  'names' attribute [6] must be the same length as the vector [5]
  1: expect_equivalent(diagnose_design(d, sims = 4, bootstrap_sims = 5)$diagnosands_df, 
         sleep_ols) at testthat/test-diagnosands.R:226
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: diagnose_design(d, sims = 4, bootstrap_sims = 5)
  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: future.apply::future_lapply(..., future.seed = future.seed, future.globals = future.globals)
  10: values(fs)
  11: values.list(fs)
  12: value(tmp, ...)
  13: value.Future(tmp, ...)
  14: resignalCondition(future)
  
  ── 18. Error: select, subtract, add diagnosands (@test-diagnosands.R#257)  ─────
  'names' attribute [6] must be the same length as the vector [5]
  1: diagnose_design(my_design, diagnosands = my_diags, sims = 4, bootstrap_sims = FALSE) at testthat/test-diagnosands.R:257
  2: simulate_design(!!!dots, sims = sims)
  3: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  4: (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]])
  5: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  6: future.apply::future_lapply(..., future.seed = future.seed, future.globals = future.globals)
  7: values(fs)
  8: values.list(fs)
  9: value(tmp, ...)
  10: value.Future(tmp, ...)
  11: resignalCondition(future)
  
  ── 19. Error: subset diagnosands (@test-diagnosands.R#296)  ────────────────────
  'names' attribute [6] must be the same length as the vector [5]
  1: diagnose_design(my_design, diagnosands = my_diags, sims = 4, bootstrap_sims = FALSE) at testthat/test-diagnosands.R:296
  2: simulate_design(!!!dots, sims = sims)
  3: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  4: (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]])
  5: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  6: future.apply::future_lapply(..., future.seed = future.seed, future.globals = future.globals)
  7: values(fs)
  8: values.list(fs)
  9: value(tmp, ...)
  10: value.Future(tmp, ...)
  11: resignalCondition(future)
  
  ── 20. Error: allow design functions to be sent to simulate design and diagnose_
  there is no package called 'dplyr'
  1: run_design(my_design_function) at testthat/test-diagnose-design.R:34
  2: run_design_internal(design)
  3: run_design_internal.function(design)
  4: design()
  5: run_design(design) at testthat/test-diagnose-design.R:31
  6: run_design_internal(design)
  7: run_design_internal.design(design)
  8: next_step(step, current_df, i)
  9: tryCatch(nxt <- step(current_df), error = function(err) {
         stop(simpleError(sprintf("Error in step %d (%s):\n\t%s", i, attr(step, "label") %||% 
             "", err)))
     })
  10: tryCatchList(expr, classes, parentenv, handlers)
  11: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  12: value[[3L]](cond)
  
  ── 21. Error: default diagnosands work (@test-diagnose-design.R#114)  ──────────
  there is no package called 'dplyr'
  1: diagnose_design(design_2 = design_2, design_1 = design_1, sims = 2) at testthat/test-diagnose-design.R:114
  2: simulate_design(!!!dots, sims = sims)
  3: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  4: (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]])
  5: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  6: future.apply::future_lapply(..., future.seed = future.seed, future.globals = future.globals)
  7: values(fs)
  8: values.list(fs)
  9: value(tmp, ...)
  10: value.Future(tmp, ...)
  11: resignalCondition(future)
  
  ── 22. Error: send estimand to estimator works (@test-environment-issues.R#28)  
  'names' attribute [6] must be the same length as the vector [5]
  1: diagnose_design(my_design, sims = 2, bootstrap_sims = 3) at testthat/test-environment-issues.R:28
  2: simulate_design(!!!dots, sims = sims)
  3: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  4: (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]])
  5: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  6: future.apply::future_lapply(..., future.seed = future.seed, future.globals = future.globals)
  7: values(fs)
  8: values.list(fs)
  9: value(tmp, ...)
  10: value.Future(tmp, ...)
  11: resignalCondition(future)
  
  ── 23. Error: difference in means (@test-estimators.R#20)  ─────────────────────
  'names' attribute [6] must be the same length as the vector [5]
  1: my_population() %>% my_potential_outcomes() %>% my_assignment() %>% reveal_outcomes() %>% 
         my_estimator() %>% expect_estimates() at testthat/test-estimators.R:20
  2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  3: eval(quote(`_fseq`(`_lhs`)), env, env)
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: `_fseq`(`_lhs`)
  6: freduce(value, `_function_list`)
  7: function_list[[i]](value)
  8: my_estimator(.)
  9: eval_tidy(quo, data = list(data = data))
  10: (FUN)(data = data, ~(Y ~ Z), label = ~"estimator")
  11: eval_tidy(quo(estimator_function(data, !!!dots)))
  12: estimator_function(data, ~(Y ~ Z))
  13: fit2tidy(results, coefficient_names)
  14: `colnames<-`(`*tmp*`, value = c("term", "estimate", "std.error", "p.value", "conf.low", 
         "conf.high"))
  
  ── 24. Error: lm with robust ses (@test-estimators.R#25)  ──────────────────────
  'names' attribute [6] must be the same length as the vector [5]
  1: my_population() %>% my_potential_outcomes() %>% my_assignment() %>% reveal_outcomes() %>% 
         my_estimator() %>% expect_estimates() at testthat/test-estimators.R:25
  2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  3: eval(quote(`_fseq`(`_lhs`)), env, env)
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: `_fseq`(`_lhs`)
  6: freduce(value, `_function_list`)
  7: function_list[[i]](value)
  8: my_estimator(.)
  9: eval_tidy(quo, data = list(data = data))
  10: (FUN)(data = data, ~(Y ~ Z), model = ~lm_robust, label = ~"estimator")
  11: eval_tidy(quo(estimator_function(data, !!!dots)))
  12: estimator_function(data, ~(Y ~ Z), model = ~lm_robust)
  13: fit2tidy(results, coefficient_names)
  14: `colnames<-`(`*tmp*`, value = c("term", "estimate", "std.error", "p.value", "conf.low", 
         "conf.high"))
  
  ── 25. Error: lm with HC3 robust ses (@test-estimators.R#31)  ──────────────────
  'names' attribute [6] must be the same length as the vector [5]
  1: my_population() %>% my_potential_outcomes() %>% my_assignment() %>% reveal_outcomes() %>% 
         my_estimator() %>% expect_estimates() at testthat/test-estimators.R:31
  2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  3: eval(quote(`_fseq`(`_lhs`)), env, env)
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: `_fseq`(`_lhs`)
  6: freduce(value, `_function_list`)
  7: function_list[[i]](value)
  8: my_estimator(.)
  9: eval_tidy(quo, data = list(data = data))
  10: (FUN)(data = data, ~(Y ~ Z), model = ~lm_robust, se_type = ~"HC3", label = ~"estimator")
  11: eval_tidy(quo(estimator_function(data, !!!dots)))
  12: estimator_function(data, ~(Y ~ Z), se_type = ~"HC3", model = ~lm_robust)
  13: fit2tidy(results, coefficient_names)
  14: `colnames<-`(`*tmp*`, value = c("term", "estimate", "std.error", "p.value", "conf.low", 
         "conf.high"))
  
  ── 26. Error: check blocked d-i-m estimator (@test-estimators.R#53)  ───────────
  'names' attribute [6] must be the same length as the vector [5]
  1: df %>% my_estimator_notblocked() %>% expect_estimates() at testthat/test-estimators.R:53
  2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  3: eval(quote(`_fseq`(`_lhs`)), env, env)
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: `_fseq`(`_lhs`)
  6: freduce(value, `_function_list`)
  7: function_list[[i]](value)
  8: my_estimator_notblocked(.)
  9: eval_tidy(quo, data = list(data = data))
  10: (FUN)(data = data, ~(Y ~ Z), label = ~"estimator")
  11: eval_tidy(quo(estimator_function(data, !!!dots)))
  12: estimator_function(data, ~(Y ~ Z))
  13: fit2tidy(results, coefficient_names)
  14: `colnames<-`(`*tmp*`, value = c("term", "estimate", "std.error", "p.value", "conf.low", 
         "conf.high"))
  
  ── 27. Error: regression from estimatr works as an estimator (@test-estimators.R
  'names' attribute [6] must be the same length as the vector [5]
  1: get_estimates(my_design) at testthat/test-estimators.R:78
  2: apply_on_design_dots(get_estimates_single_design, ...)
  3: lapply(designs, FUN)
  4: FUN(X[[i]], ...)
  5: run_design_internal(design, results = results)
  6: run_design_internal.design(design, results = results)
  7: next_step(step, current_df, i)
  8: tryCatch(nxt <- step(current_df), error = function(err) {
         stop(simpleError(sprintf("Error in step %d (%s):\n\t%s", i, attr(step, "label") %||% 
             "", err)))
     })
  9: tryCatchList(expr, classes, parentenv, handlers)
  10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  11: value[[3L]](cond)
  
  ── 28. Error: multiple estimator declarations work (@test-estimators.R#99)  ────
  You provided a estimatr::lm_robust model, which DeclareDesign does not directly support. It's possible that the broom package can help. Please install the broom package with install.packages('broom') and try declaring your estimator again. If that fix does not work, you may need to write a custom estimator.
  1: declare_estimator(formula = Y ~ Z, model = estimatr::lm_robust, estimand = sate, 
         label = "estimator_1") at testthat/test-estimators.R:99
  2: validate(handler, ret, dots, label)
  3: validation_fn(handler)(ret, dots, label)
  4: stop("You provided a ", quo_text(dots$model), " model, which DeclareDesign does not directly support. It's possible that the broom package can help. Please install the broom package with install.packages('broom') and try declaring your estimator again. If that fix does not work, you may need to write a custom estimator.")
  
  ── 29. Error: multiple estimator declarations work (@test-estimators.R#130)  ───
  You provided a estimatr::lm_robust model, which DeclareDesign does not directly support. It's possible that the broom package can help. Please install the broom package with install.packages('broom') and try declaring your estimator again. If that fix does not work, you may need to write a custom estimator.
  1: declare_estimator(formula = Y ~ Z, model = estimatr::lm_robust, estimand = sate, 
         label = "estimator_3") at testthat/test-estimators.R:130
  2: validate(handler, ret, dots, label)
  3: validation_fn(handler)(ret, dots, label)
  4: stop("You provided a ", quo_text(dots$model), " model, which DeclareDesign does not directly support. It's possible that the broom package can help. Please install the broom package with install.packages('broom') and try declaring your estimator again. If that fix does not work, you may need to write a custom estimator.")
  
  ── 30. Error: multiple estimator declarations work (@test-estimators.R#161)  ───
  You provided a estimatr::lm_robust model, which DeclareDesign does not directly support. It's possible that the broom package can help. Please install the broom package with install.packages('broom') and try declaring your estimator again. If that fix does not work, you may need to write a custom estimator.
  1: declare_estimator(formula = Y ~ Z, model = estimatr::lm_robust, estimand = sate) at testthat/test-estimators.R:161
  2: validate(handler, ret, dots, label)
  3: validation_fn(handler)(ret, dots, label)
  4: stop("You provided a ", quo_text(dots$model), " model, which DeclareDesign does not directly support. It's possible that the broom package can help. Please install the broom package with install.packages('broom') and try declaring your estimator again. If that fix does not work, you may need to write a custom estimator.")
  
  ── 31. Error: labels for estimates and estimands work estimand splat labeld esti
  'names' attribute [6] must be the same length as the vector [5]
  1: df %>% mator_no_label() %>% expect_label("estimator", "ATE") at testthat/test-estimators.R:205
  2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  3: eval(quote(`_fseq`(`_lhs`)), env, env)
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: `_fseq`(`_lhs`)
  6: freduce(value, `_function_list`)
  7: function_list[[i]](value)
  8: mator_no_label(.)
  9: eval_tidy(quo, data = list(data = data))
  10: (FUN)(data = data, ~(Y ~ Z), estimand = ~mand_arg_label, label = ~"estimator")
  11: eval_tidy(quo(estimator_function(data, !!!dots)))
  12: estimator_function(data, ~(Y ~ Z))
  13: fit2tidy(results, coefficient_names)
  14: `colnames<-`(`*tmp*`, value = c("term", "estimate", "std.error", "p.value", "conf.low", 
         "conf.high"))
  
  ── 32. Error: labels for estimates and estimands work, label explicit, estimand 
  'names' attribute [6] must be the same length as the vector [5]
  1: df %>% mator_label() %>% expect_label("an_estimator", "ATE") at testthat/test-estimators.R:210
  2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  3: eval(quote(`_fseq`(`_lhs`)), env, env)
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: `_fseq`(`_lhs`)
  6: freduce(value, `_function_list`)
  7: function_list[[i]](value)
  8: mator_label(.)
  9: eval_tidy(quo, data = list(data = data))
  10: (FUN)(data = data, ~(Y ~ Z), estimand = ~mand_arg_label, label = ~"an_estimator")
  11: eval_tidy(quo(estimator_function(data, !!!dots)))
  12: estimator_function(data, ~(Y ~ Z))
  13: fit2tidy(results, coefficient_names)
  14: `colnames<-`(`*tmp*`, value = c("term", "estimate", "std.error", "p.value", "conf.low", 
         "conf.high"))
  
  ── 33. Error: labels for estimates and estimands work - label default (@test-est
  'names' attribute [6] must be the same length as the vector [5]
  1: df %>% mator_no_label() %>% expect_label("estimator", "ATE") at testthat/test-estimators.R:220
  2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  3: eval(quote(`_fseq`(`_lhs`)), env, env)
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: `_fseq`(`_lhs`)
  6: freduce(value, `_function_list`)
  7: function_list[[i]](value)
  8: mator_no_label(.)
  9: eval_tidy(quo, data = list(data = data))
  10: (FUN)(data = data, ~(Y ~ Z), estimand = ~mand_explicit_label, label = ~"estimator")
  11: eval_tidy(quo(estimator_function(data, !!!dots)))
  12: estimator_function(data, ~(Y ~ Z))
  13: fit2tidy(results, coefficient_names)
  14: `colnames<-`(`*tmp*`, value = c("term", "estimate", "std.error", "p.value", "conf.low", 
         "conf.high"))
  
  ── 34. Error: labels for estimates and estimands work - label explicit (@test-es
  'names' attribute [6] must be the same length as the vector [5]
  1: df %>% mator_label() %>% expect_label("an_estimator", "ATE") at testthat/test-estimators.R:226
  2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  3: eval(quote(`_fseq`(`_lhs`)), env, env)
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: `_fseq`(`_lhs`)
  6: freduce(value, `_function_list`)
  7: function_list[[i]](value)
  8: mator_label(.)
  9: eval_tidy(quo, data = list(data = data))
  10: (FUN)(data = data, ~(Y ~ Z), estimand = ~mand_explicit_label, label = ~"an_estimator")
  11: eval_tidy(quo(estimator_function(data, !!!dots)))
  12: estimator_function(data, ~(Y ~ Z))
  13: fit2tidy(results, coefficient_names)
  14: `colnames<-`(`*tmp*`, value = c("term", "estimate", "std.error", "p.value", "conf.low", 
         "conf.high"))
  
  ── 35. Error: labels for estimates and estimands work estimand label, estimator 
  'names' attribute [6] must be the same length as the vector [5]
  1: df %>% mator_no_label() %>% expect_label("estimator", "ATE") at testthat/test-estimators.R:237
  2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  3: eval(quote(`_fseq`(`_lhs`)), env, env)
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: `_fseq`(`_lhs`)
  6: freduce(value, `_function_list`)
  7: function_list[[i]](value)
  8: mator_no_label(.)
  9: eval_tidy(quo, data = list(data = data))
  10: (FUN)(data = data, ~(Y ~ Z), estimand = ~mand_explicit_label, label = ~"estimator")
  11: eval_tidy(quo(estimator_function(data, !!!dots)))
  12: estimator_function(data, ~(Y ~ Z))
  13: fit2tidy(results, coefficient_names)
  14: `colnames<-`(`*tmp*`, value = c("term", "estimate", "std.error", "p.value", "conf.low", 
         "conf.high"))
  
  ── 36. Error: coefficient_names = TRUE returns all term (@test-estimators.R#258)
  'names' attribute [6] must be the same length as the vector [5]
  1: est4(tst) at testthat/test-estimators.R:258
  2: eval_tidy(quo, data = list(data = data))
  3: (FUN)(data = data, ~(y ~ x + as.factor(clust)), clusters = ~clust, weights = ~wt, 
         model = ~lm_robust, term = ~TRUE, label = ~"estimator")
  4: eval_tidy(quo(estimator_function(data, !!!dots)))
  5: estimator_function(data, ~(y ~ x + as.factor(clust)), clusters = ~clust, weights = ~wt, 
         model = ~lm_robust, term = ~TRUE)
  6: fit2tidy(results, coefficient_names)
  7: `colnames<-`(`*tmp*`, value = c("term", "estimate", "std.error", "p.value", "conf.low", 
         "conf.high"))
  
  ── 37. Error: model_handler runs directly (@test-estimators.R#279)  ────────────
  'names' attribute [6] must be the same length as the vector [5]
  1: model_handler(sleep, extra ~ group, model = lm, term = "group2") at testthat/test-estimators.R:279
  2: fit2tidy(results, coefficient_names)
  3: `colnames<-`(`*tmp*`, value = c("term", "estimate", "std.error", "p.value", "conf.low", 
         "conf.high"))
  
  ── 38. Error: estimators have different columns (@test-estimators.R#330)  ──────
  'names' attribute [6] must be the same length as the vector [5]
  1: get_estimates(matching) at testthat/test-estimators.R:330
  2: apply_on_design_dots(get_estimates_single_design, ...)
  3: lapply(designs, FUN)
  4: FUN(X[[i]], ...)
  5: run_design_internal(design, results = results)
  6: run_design_internal.design(design, results = results)
  7: next_step(step, current_df, i)
  8: tryCatch(nxt <- step(current_df), error = function(err) {
         stop(simpleError(sprintf("Error in step %d (%s):\n\t%s", i, attr(step, "label") %||% 
             "", err)))
     })
  9: tryCatchList(expr, classes, parentenv, handlers)
  10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  11: value[[3L]](cond)
  
  ── 39. Failure: when a term is missing from a model there is an informative erro
  `ols(data)` threw an error with unexpected message.
  Expected match: "Not all of the terms declared in your estimator are present in the model output, including X."
  Actual message: "'names' attribute [6] must be the same length as the vector [5]"
  
  ── 40. Error: Factorial (@test-factorial.R#36)  ────────────────────────────────
  there is no package called 'dplyr'
  1: expect_equal(my_design %>% draw_data() %>% nrow(), 2000) at testthat/test-factorial.R:36
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: my_design %>% draw_data() %>% nrow()
  5: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  6: eval(quote(`_fseq`(`_lhs`)), env, env)
  7: eval(quote(`_fseq`(`_lhs`)), env, env)
  8: `_fseq`(`_lhs`)
  9: freduce(value, `_function_list`)
  10: function_list[[i]](value)
  11: draw_data(.)
  12: run_design_internal(design, results = list(current_df = 0))
  13: run_design_internal.design(design, results = list(current_df = 0))
  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)
  
  ── 41. Error: Diagnosing a fanout (@test-fanout.R#60)  ─────────────────────────
  'names' attribute [6] must be the same length as the vector [5]
  1: expect_warning(diagnose_design(D, sims = strategy)) at testthat/test-fanout.R:60
  2: quasi_capture(enquo(object), capture_warnings, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withCallingHandlers(code, warning = function(condition) {
         out$push(condition)
         invokeRestart("muffleWarning")
     })
  5: eval_bare(get_expr(quo), get_env(quo))
  6: diagnose_design(D, sims = strategy)
  7: simulate_design(!!!dots, sims = sims)
  8: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  9: (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]])
  10: fan_out(design, sims)
  11: future_lapply(seq_along(st), function(j) run_design(st[[j]]), future.seed = NA, future.globals = "st")
  12: future.apply::future_lapply(..., future.seed = future.seed, future.globals = future.globals)
  13: values(fs)
  14: values.list(fs)
  15: value(tmp, ...)
  16: value.Future(tmp, ...)
  17: resignalCondition(future)
  
  ── 42. Error: fanout warnings (@test-fanout.R#123)  ────────────────────────────
  'names' attribute [6] must be the same length as the vector [5]
  1: expect_warning(diagnose_design(D, sims = strategy)) at testthat/test-fanout.R:123
  2: quasi_capture(enquo(object), capture_warnings, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withCallingHandlers(code, warning = function(condition) {
         out$push(condition)
         invokeRestart("muffleWarning")
     })
  5: eval_bare(get_expr(quo), get_env(quo))
  6: diagnose_design(D, sims = strategy)
  7: simulate_design(!!!dots, sims = sims)
  8: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  9: (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]])
  10: fan_out(design, sims)
  11: future_lapply(seq_along(st), function(j) run_design(st[[j]]), future.seed = NA, future.globals = "st")
  12: future.apply::future_lapply(..., future.seed = future.seed, future.globals = future.globals)
  13: values(fs)
  14: values.list(fs)
  15: value(tmp, ...)
  16: value.Future(tmp, ...)
  17: resignalCondition(future)
  
  ── 43. Error: test default term Z, lm (@test-model.R#23)  ──────────────────────
  'names' attribute [6] must be the same length as the vector [5]
  1: expect_equal(estimator_lm(dat), estimator_lm_nocoef(dat)) at testthat/test-model.R:23
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: estimator_lm(dat)
  5: eval_tidy(quo, data = list(data = data))
  6: (FUN)(data = data, ~(Y ~ Z), model = ~lm, term = ~"Z", label = ~"estimator")
  7: eval_tidy(quo(estimator_function(data, !!!dots)))
  8: estimator_function(data, ~(Y ~ Z), model = ~lm, term = ~"Z")
  9: fit2tidy(results, coefficient_names)
  10: `colnames<-`(`*tmp*`, value = c("term", "estimate", "std.error", "p.value", "conf.low", 
         "conf.high"))
  
  ── 44. Error: test estimators, labels, quoted Z (@test-model.R#49)  ────────────
  'names' attribute [6] must be the same length as the vector [5]
  1: expect_identical(estimator_lm(dat), estimator_lm_nocoef(dat)) at testthat/test-model.R:49
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: estimator_lm(dat)
  5: eval_tidy(quo, data = list(data = data))
  6: (FUN)(data = data, ~(Y ~ Z), model = ~lm, term = ~"Z", label = ~"my_lm")
  7: eval_tidy(quo(estimator_function(data, !!!dots)))
  8: estimator_function(data, ~(Y ~ Z), model = ~lm, term = ~"Z")
  9: fit2tidy(results, coefficient_names)
  10: `colnames<-`(`*tmp*`, value = c("term", "estimate", "std.error", "p.value", "conf.low", 
         "conf.high"))
  
  ── 45. Error: test GLM estimators, default vs explicit Z (@test-model.R#61)  ───
  'names' attribute [6] must be the same length as the vector [5]
  1: expect_identical(estimator_glm(dat), estimator_glm_nocoef(dat)) at testthat/test-model.R:61
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: estimator_glm(dat)
  5: eval_tidy(quo, data = list(data = data))
  6: (FUN)(data = data, ~(Y ~ Z), model = ~glm, term = ~"Z", label = ~"estimator")
  7: eval_tidy(quo(estimator_function(data, !!!dots)))
  8: estimator_function(data, ~(Y ~ Z), model = ~glm, term = ~"Z")
  9: fit2tidy(results, coefficient_names)
  10: `colnames<-`(`*tmp*`, value = c("term", "estimate", "std.error", "p.value", "conf.low", 
         "conf.high"))
  
  ── 46. Error: test GLM estimators with label (@test-model.R#77)  ───────────────
  'names' attribute [6] must be the same length as the vector [5]
  1: expect_identical(estimator_glm(dat), estimator_glm_nocoef(dat)) at testthat/test-model.R:77
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: estimator_glm(dat)
  5: eval_tidy(quo, data = list(data = data))
  6: (FUN)(data = data, ~(Y ~ Z), model = ~glm, term = ~"Z", label = ~"my_glm")
  7: eval_tidy(quo(estimator_function(data, !!!dots)))
  8: estimator_function(data, ~(Y ~ Z), model = ~glm, term = ~"Z")
  9: fit2tidy(results, coefficient_names)
  10: `colnames<-`(`*tmp*`, value = c("term", "estimate", "std.error", "p.value", "conf.low", 
         "conf.high"))
  
  ── 47. Error: test logit default vs explicit Z (@test-model.R#95)  ─────────────
  'names' attribute [6] must be the same length as the vector [5]
  1: expect_identical(estimator_logit(dat), estimator_logit_nocoef(dat)) at testthat/test-model.R:95
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: estimator_logit(dat)
  5: eval_tidy(quo, data = list(data = data))
  6: (FUN)(data = data, ~(Y ~ Z), model = ~glm, family = ~binomial, term = ~"Z", label = ~"estimator")
  7: eval_tidy(quo(estimator_function(data, !!!dots)))
  8: estimator_function(data, ~(Y ~ Z), family = ~binomial, model = ~glm, term = ~"Z")
  9: fit2tidy(results, coefficient_names)
  10: `colnames<-`(`*tmp*`, value = c("term", "estimate", "std.error", "p.value", "conf.low", 
         "conf.high"))
  
  ── 48. Error: lm (@test-model.R#181)  ──────────────────────────────────────────
  'names' attribute [6] must be the same length as the vector [5]
  1: expect_equal(ncol(get_estimates(des)), 8) at testthat/test-model.R:181
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: ncol(get_estimates(des))
  5: get_estimates(des)
  6: apply_on_design_dots(get_estimates_single_design, ...)
  7: lapply(designs, FUN)
  8: FUN(X[[i]], ...)
  9: run_design_internal(design, results = results)
  10: run_design_internal.design(design, results = results)
  11: next_step(step, current_df, i)
  12: tryCatch(nxt <- step(current_df), error = function(err) {
         stop(simpleError(sprintf("Error in step %d (%s):\n\t%s", i, attr(step, "label") %||% 
             "", err)))
     })
  13: tryCatchList(expr, classes, parentenv, handlers)
  14: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  15: value[[3L]](cond)
  
  ── 49. Error: glm (@test-model.R#186)  ─────────────────────────────────────────
  'names' attribute [6] must be the same length as the vector [5]
  1: expect_equal(ncol(get_estimates(des)), 8) at testthat/test-model.R:186
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: ncol(get_estimates(des))
  5: get_estimates(des)
  6: apply_on_design_dots(get_estimates_single_design, ...)
  7: lapply(designs, FUN)
  8: FUN(X[[i]], ...)
  9: run_design_internal(design, results = results)
  10: run_design_internal.design(design, results = results)
  11: next_step(step, current_df, i)
  12: tryCatch(nxt <- step(current_df), error = function(err) {
         stop(simpleError(sprintf("Error in step %d (%s):\n\t%s", i, attr(step, "label") %||% 
             "", err)))
     })
  13: tryCatchList(expr, classes, parentenv, handlers)
  14: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  15: value[[3L]](cond)
  
  ── 50. Error: betareg (@test-model.R#194)  ─────────────────────────────────────
  You provided a betareg::betareg model, which DeclareDesign does not directly support. It's possible that the broom package can help. Please install the broom package with install.packages('broom') and try declaring your estimator again. If that fix does not work, you may need to write a custom estimator.
  1: declare_estimator(D2 ~ Z, model = betareg::betareg) at testthat/test-model.R:194
  2: validate(handler, ret, dots, label)
  3: validation_fn(handler)(ret, dots, label)
  4: stop("You provided a ", quo_text(dots$model), " model, which DeclareDesign does not directly support. It's possible that the broom package can help. Please install the broom package with install.packages('broom') and try declaring your estimator again. If that fix does not work, you may need to write a custom estimator.")
  
  ── 51. Error: biglm (@test-model.R#201)  ───────────────────────────────────────
  You provided a biglm::biglm model, which DeclareDesign does not directly support. It's possible that the broom package can help. Please install the broom package with install.packages('broom') and try declaring your estimator again. If that fix does not work, you may need to write a custom estimator.
  1: declare_estimator(Y ~ Z, model = biglm::biglm) at testthat/test-model.R:201
  2: validate(handler, ret, dots, label)
  3: validation_fn(handler)(ret, dots, label)
  4: stop("You provided a ", quo_text(dots$model), " model, which DeclareDesign does not directly support. It's possible that the broom package can help. Please install the broom package with install.packages('broom') and try declaring your estimator again. If that fix does not work, you may need to write a custom estimator.")
  
  ── 52. Error: gam (@test-model.R#207)  ─────────────────────────────────────────
  You provided a gam::gam model, which DeclareDesign does not directly support. It's possible that the broom package can help. Please install the broom package with install.packages('broom') and try declaring your estimator again. If that fix does not work, you may need to write a custom estimator.
  1: declare_estimator(Y ~ Z, model = gam::gam) at testthat/test-model.R:207
  2: validate(handler, ret, dots, label)
  3: validation_fn(handler)(ret, dots, label)
  4: stop("You provided a ", quo_text(dots$model), " model, which DeclareDesign does not directly support. It's possible that the broom package can help. Please install the broom package with install.packages('broom') and try declaring your estimator again. If that fix does not work, you may need to write a custom estimator.")
  
  ── 53. Error: lfe (@test-model.R#213)  ─────────────────────────────────────────
  You provided a lfe::felm model, which DeclareDesign does not directly support. It's possible that the broom package can help. Please install the broom package with install.packages('broom') and try declaring your estimator again. If that fix does not work, you may need to write a custom estimator.
  1: declare_estimator(Y ~ Z, model = lfe::felm) at testthat/test-model.R:213
  2: validate(handler, ret, dots, label)
  3: validation_fn(handler)(ret, dots, label)
  4: stop("You provided a ", quo_text(dots$model), " model, which DeclareDesign does not directly support. It's possible that the broom package can help. Please install the broom package with install.packages('broom') and try declaring your estimator again. If that fix does not work, you may need to write a custom estimator.")
  
  ── 54. Error: polr (@test-model.R#220)  ────────────────────────────────────────
  You provided a MASS::polr model, which DeclareDesign does not directly support. It's possible that the broom package can help. Please install the broom package with install.packages('broom') and try declaring your estimator again. If that fix does not work, you may need to write a custom estimator.
  1: declare_estimator(Y_fac ~ Z, model = MASS::polr) at testthat/test-model.R:220
  2: validate(handler, ret, dots, label)
  3: validation_fn(handler)(ret, dots, label)
  4: stop("You provided a ", quo_text(dots$model), " model, which DeclareDesign does not directly support. It's possible that the broom package can help. Please install the broom package with install.packages('broom') and try declaring your estimator again. If that fix does not work, you may need to write a custom estimator.")
  
  ── 55. Error: test modify declare design  (@test-modify-design.R#4)  ───────────
  there is no package called 'dplyr'
  1: library(dplyr) at testthat/test-modify-design.R:4
  2: stop(txt, domain = NA)
  
  ── 56. Error: Multiple Coefficients (@test-multiple-coefficients.R#28)  ────────
  'names' attribute [6] must be the same length as the vector [5]
  1: diagnose_design(my_design, sims = 2, bootstrap_sims = FALSE) at testthat/test-multiple-coefficients.R:28
  2: simulate_design(!!!dots, sims = sims)
  3: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  4: (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]])
  5: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  6: future.apply::future_lapply(..., future.seed = future.seed, future.globals = future.globals)
  7: values(fs)
  8: values.list(fs)
  9: value(tmp, ...)
  10: value.Future(tmp, ...)
  11: resignalCondition(future)
  
  ── 57. Error: Multiple estimands can be mapped to one estimator (@test-multiple-
  You provided a estimatr::lm_robust model, which DeclareDesign does not directly support. It's possible that the broom package can help. Please install the broom package with install.packages('broom') and try declaring your estimator again. If that fix does not work, you may need to write a custom estimator.
  1: declare_estimator(Y ~ X, model = estimatr::lm_robust, se_type = "classical", estimand = c(dgp_se, 
         obs_se), term = "X") at testthat/test-multiple-estimands-one-estimator.R:23
  2: validate(handler, ret, dots, label)
  3: validation_fn(handler)(ret, dots, label)
  4: stop("You provided a ", quo_text(dots$model), " model, which DeclareDesign does not directly support. It's possible that the broom package can help. Please install the broom package with install.packages('broom') and try declaring your estimator again. If that fix does not work, you may need to write a custom estimator.")
  
  ── 58. Error: More multiple estimands (@test-multiple-estimands-one-estimator.R#
  'names' attribute [6] must be the same length as the vector [5]
  1: expect_equal(get_estimates(des)$estimand_label, c("pate", "sate")) at testthat/test-multiple-estimands-one-estimator.R:73
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: get_estimates(des)
  5: apply_on_design_dots(get_estimates_single_design, ...)
  6: lapply(designs, FUN)
  7: FUN(X[[i]], ...)
  8: run_design_internal(design, results = results)
  9: run_design_internal.design(design, results = results)
  10: next_step(step, current_df, i)
  11: tryCatch(nxt <- step(current_df), error = function(err) {
         stop(simpleError(sprintf("Error in step %d (%s):\n\t%s", i, attr(step, "label") %||% 
             "", err)))
     })
  12: tryCatchList(expr, classes, parentenv, handlers)
  13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  14: value[[3L]](cond)
  
  ── 59. Error: Two estimators, Two estimands (matched) (@test-multiple-estimators
  'names' attribute [6] must be the same length as the vector [5]
  1: diagnose_design(des, sims = 5, bootstrap_sims = FALSE) at testthat/test-multiple-estimators.R:32
  2: simulate_design(!!!dots, sims = sims)
  3: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  4: (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]])
  5: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  6: future.apply::future_lapply(..., future.seed = future.seed, future.globals = future.globals)
  7: values(fs)
  8: values.list(fs)
  9: value(tmp, ...)
  10: value.Future(tmp, ...)
  11: resignalCondition(future)
  
  ── 60. Error: Two estimators, Two estimands (crossed) (@test-multiple-estimators
  'names' attribute [6] must be the same length as the vector [5]
  1: diagnose_design(des, sims = 5, bootstrap_sims = FALSE) at testthat/test-multiple-estimators.R:52
  2: simulate_design(!!!dots, sims = sims)
  3: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  4: (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]])
  5: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  6: future.apply::future_lapply(..., future.seed = future.seed, future.globals = future.globals)
  7: values(fs)
  8: values.list(fs)
  9: value(tmp, ...)
  10: value.Future(tmp, ...)
  11: resignalCondition(future)
  
  ── 61. Error: multiple design get_estimates (@test-post-estimation.R#61)  ──────
  'names' attribute [6] must be the same length as the vector [5]
  1: get_estimates(design_1) at testthat/test-post-estimation.R:61
  2: apply_on_design_dots(get_estimates_single_design, ...)
  3: lapply(designs, FUN)
  4: FUN(X[[i]], ...)
  5: run_design_internal(design, results = results)
  6: run_design_internal.design(design, results = results)
  7: next_step(step, current_df, i)
  8: tryCatch(nxt <- step(current_df), error = function(err) {
         stop(simpleError(sprintf("Error in step %d (%s):\n\t%s", i, attr(step, "label") %||% 
             "", err)))
     })
  9: tryCatchList(expr, classes, parentenv, handlers)
  10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  11: value[[3L]](cond)
  
  ── 62. Error: POs at a higher level (@test-potential-outcomes.R#77)  ───────────
  there is no package called 'dplyr'
  1: library(dplyr) at testthat/test-potential-outcomes.R:77
  2: stop(txt, domain = NA)
  
  ── 63. Failure: error if you try to draw POs at a level using a variable that do
  `my_potential_outcomes_formula(pop)` did not throw an error.
  
  ── 64. Error: vary works (@test-quick-design.R#87)  ────────────────────────────
  'names' attribute [6] must be the same length as the vector [5]
  1: diagnose_design(design, sims = 2, bootstrap_sims = FALSE) at testthat/test-quick-design.R:87
  2: simulate_design(!!!dots, sims = sims)
  3: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  4: (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]])
  5: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  6: future.apply::future_lapply(..., future.seed = future.seed, future.globals = future.globals)
  7: values(fs)
  8: values.list(fs)
  9: value(tmp, ...)
  10: value.Future(tmp, ...)
  11: resignalCondition(future)
  
  ── 65. Error: power curve (@test-quick-design.R#137)  ──────────────────────────
  'names' attribute [6] must be the same length as the vector [5]
  1: diagnose_design(design, sims = 2, bootstrap_sims = FALSE) at testthat/test-quick-design.R:137
  2: simulate_design(!!!dots, sims = sims)
  3: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  4: (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]])
  5: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  6: future.apply::future_lapply(..., future.seed = future.seed, future.globals = future.globals)
  7: values(fs)
  8: values.list(fs)
  9: value(tmp, ...)
  10: value.Future(tmp, ...)
  11: resignalCondition(future)
  
  ── 66. Error: reshape works (@test-reshape-diagnosis.R#30)  ────────────────────
  there is no package called 'dplyr'
  1: diagnose_design(design, sims = 10, bootstrap_sims = 5) at testthat/test-reshape-diagnosis.R:30
  2: simulate_design(!!!dots, sims = sims)
  3: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  4: (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]])
  5: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  6: future.apply::future_lapply(..., future.seed = future.seed, future.globals = future.globals)
  7: values(fs)
  8: values.list(fs)
  9: value(tmp, ...)
  10: value.Future(tmp, ...)
  11: resignalCondition(future)
  
  ── 67. Error: capitalization of parameter names are retained (@test-reshape-diag
  'names' attribute [6] must be the same length as the vector [5]
  1: diagnose_design(design_list, sims = 2) at testthat/test-reshape-diagnosis.R:61
  2: simulate_design(!!!dots, sims = sims)
  3: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  4: (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]])
  5: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  6: future.apply::future_lapply(..., future.seed = future.seed, future.globals = future.globals)
  7: values(fs)
  8: values.list(fs)
  9: value(tmp, ...)
  10: value.Future(tmp, ...)
  11: resignalCondition(future)
  
  ── 68. Error: select (@test-reshape-diagnosis.R#77)  ───────────────────────────
  there is no package called 'dplyr'
  1: diagnose_design(design, sims = 10, bootstrap_sims = 5) at testthat/test-reshape-diagnosis.R:77
  2: simulate_design(!!!dots, sims = sims)
  3: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  4: (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]])
  5: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  6: future.apply::future_lapply(..., future.seed = future.seed, future.globals = future.globals)
  7: values(fs)
  8: values.list(fs)
  9: value(tmp, ...)
  10: value.Future(tmp, ...)
  11: resignalCondition(future)
  
  ── 69. Error: Simulate Design works (@test-simulate-design.R#16)  ──────────────
  'names' attribute [6] must be the same length as the vector [5]
  1: simulate_design(my_design_1, sims = 5) at testthat/test-simulate-design.R:16
  2: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  3: (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]])
  4: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  5: future.apply::future_lapply(..., future.seed = future.seed, future.globals = future.globals)
  6: values(fs)
  7: values.list(fs)
  8: value(tmp, ...)
  9: value.Future(tmp, ...)
  10: resignalCondition(future)
  
  ── 70. Error: expand and simulate (@test-simulate-design.R#52)  ────────────────
  'names' attribute [6] must be the same length as the vector [5]
  1: simulate_design(my_designs, sims = 5) at testthat/test-simulate-design.R:52
  2: mapply(design = designs, sims = sims, FUN = simulate_single_design, SIMPLIFY = FALSE)
  3: (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]])
  4: future_lapply(seq_len(sims), function(i) run_design(design), future.seed = NA, future.globals = "design")
  5: future.apply::future_lapply(..., future.seed = future.seed, future.globals = future.globals)
  6: values(fs)
  7: values.list(fs)
  8: value(tmp, ...)
  9: value.Future(tmp, ...)
  10: resignalCondition(future)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 287 SKIPPED: 5 FAILED: 70
  1. Error: (unknown) (@test-allow-custom-functions.R#1) 
  2. Error: test diagnosands (@test-bootstrap-diagnosands.R#32) 
  3. Error: compare_designs works (@test-compare-designs.R#33) 
  4. Error: test the custom execution strategy (@test-conduct-custom.R#20) 
  5. Error: test the full declare design setup (@test-declare-design.R#33) 
  6. Error: demo runs (@test-demo.R#96) 
  7. Error: Basic design summary (@test-design-summary.R#27) 
  8. Error: summary, estimator formula print formula (@test-design-summary.R#82) 
  9. Error: summary, estimator print model (@test-design-summary.R#87) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted