Library of Research Designs
Overview
A simple interface to build designs using the package 'DeclareDesign'. In one line of code, users can specify the parameters of individual designs and diagnose their properties. The designers can also be used to compare performance of a given design across a range of combinations of parameters, such as effect size, sample size, and assignment probabilities.
- Further updates for syntax for DeclareDesign v. 0.28.0
From NEWS.md in the release
Install
Health
ERRORtestsr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64, r-oldrel-windows-x86_64, r-patched-linux-x86_64, r-release-linux-x86_64, r-release-windows-x86_64
r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang
Running ‘testthat.R’ [11s/12s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(DesignLibrary)
Loading required package: DeclareDesign
Loading required package: randomizr
Loading required package: fabricatr
Loading required package: estimatr
>
> test_check(package = "DesignLibrary")
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
Saving _problems/test_designers-37.R
Saving _problems/test_designers-128.R
Saving _problems/test_diagnose_designers-6.R
[ FAIL 3 | WARN 18 | SKIP 0 | PASS 323 ]
══ Failed tests ═══════════════
...[truncated]...
└─DeclareDesign (local) `<fn>`(design = dots[[1L]][[2L]], sims = dots[[2L]][[2L]], future.seed = dots[[3L]][[1L]])
5. ├─base::withCallingHandlers(...)
6. ├─base::suppressWarnings(...)
7. │ └─base::withCallingHandlers(...)
8. └─DeclareDesign:::future_lapply(...)
9. └─base::lapply(...)
10. └─DeclareDesign (local) FUN(X[[i]], ...)
11. ├─DeclareDesign:::run_design_internal(design)
12. └─DeclareDesign:::run_design_internal.design(design)
13. └─DeclareDesign:::next_step(step, current_df, i)
14. └─base::tryCatch(...)
15. └─base (local) tryCatchList(expr, classes, parentenv, handlers)
16. └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
17. └─value[[3L]](cond)
[ FAIL 3 | WARN 18 | SKIP 0 | PASS 323 ]
Error:
! Test failures.
Execution haltedr-devel-linux-x86_64-debian-clang
Running ‘testthat.R’ [17s/22s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(DesignLibrary)
Loading required package: DeclareDesign
Loading required package: randomizr
Loading required package: fabricatr
Loading required package: estimatr
>
> test_check(package = "DesignLibrary")
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
Saving _problems/test_designers-37.R
Saving _problems/test_designers-128.R
Saving _problems/test_diagnose_designers-6.R
[ FAIL 3 | WARN 18 | SKIP 0 | PASS 323 ]
══ Failed tests ═══════════════
...[truncated]...
└─DeclareDesign (local) `<fn>`(design = dots[[1L]][[2L]], sims = dots[[2L]][[2L]], future.seed = dots[[3L]][[1L]])
5. ├─base::withCallingHandlers(...)
6. ├─base::suppressWarnings(...)
7. │ └─base::withCallingHandlers(...)
8. └─DeclareDesign:::future_lapply(...)
9. └─base::lapply(...)
10. └─DeclareDesign (local) FUN(X[[i]], ...)
11. ├─DeclareDesign:::run_design_internal(design)
12. └─DeclareDesign:::run_design_internal.design(design)
13. └─DeclareDesign:::next_step(step, current_df, i)
14. └─base::tryCatch(...)
15. └─base (local) tryCatchList(expr, classes, parentenv, handlers)
16. └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
17. └─value[[3L]](cond)
[ FAIL 3 | WARN 18 | SKIP 0 | PASS 323 ]
Error:
! Test failures.
Execution haltedr-devel-linux-x86_64-fedora-gcc
Running ‘testthat.R’ [13s/13s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(DesignLibrary)
Loading required package: DeclareDesign
Loading required package: randomizr
Loading required package: fabricatr
Loading required package: estimatr
>
> test_check(package = "DesignLibrary")
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
Saving _problems/test_designers-37.R
Saving _problems/test_designers-128.R
Saving _problems/test_diagnose_designers-6.R
[ FAIL 3 | WARN 18 | SKIP 0 | PASS 323 ]
══ Failed tests ═══════════════
...[truncated]...
::simulate_design(!!!dots, sims = sims, future.seed = future.seed)
3. └─base::mapply(...)
4. └─DeclareDesign (local) `<fn>`(design = dots[[1L]][[2L]], sims = dots[[2L]][[2L]], future.seed = dots[[3L]][[1L]])
5. ├─base::withCallingHandlers(...)
6. ├─base::suppressWarnings(...)
7. │ └─base::withCallingHandlers(...)
8. └─DeclareDesign:::future_lapply(...)
9. └─future.apply::future_lapply(..., future.seed = future.seed, future.globals = future.globals)
10. └─future.apply:::future_xapply(...)
11. └─base::tryCatch(...)
12. └─base (local) tryCatchList(expr, classes, parentenv, handlers)
13. └─base (local) tryCatchOne(...)
14. └─value[[3L]](cond)
15. └─future.apply:::onError(e, futures = fs, debug = debug)
[ FAIL 3 | WARN 18 | SKIP 0 | PASS 323 ]
Error:
! Test failures.
Execution haltedr-devel-windows-x86_64
Running 'testthat.R' [16s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> library(testthat)
> library(DesignLibrary)
Loading required package: DeclareDesign
Loading required package: randomizr
Loading required package: fabricatr
Loading required package: estimatr
>
> test_check(package = "DesignLibrary")
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
Saving _problems/test_designers-37.R
Saving _problems/test_designers-128.R
Saving _problems/test_diagnose_designers-6.R
[ FAIL 3 | WARN 18 | SKIP 0 | PASS 323 ]
══ Failed tests ═══════════════════
...[truncated]...
└─DeclareDesign (local) `<fn>`(design = dots[[1L]][[2L]], sims = dots[[2L]][[2L]], future.seed = dots[[3L]][[1L]])
5. ├─base::withCallingHandlers(...)
6. ├─base::suppressWarnings(...)
7. │ └─base::withCallingHandlers(...)
8. └─DeclareDesign:::future_lapply(...)
9. └─base::lapply(...)
10. └─DeclareDesign (local) FUN(X[[i]], ...)
11. ├─DeclareDesign:::run_design_internal(design)
12. └─DeclareDesign:::run_design_internal.design(design)
13. └─DeclareDesign:::next_step(step, current_df, i)
14. └─base::tryCatch(...)
15. └─base (local) tryCatchList(expr, classes, parentenv, handlers)
16. └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
17. └─value[[3L]](cond)
[ FAIL 3 | WARN 18 | SKIP 0 | PASS 323 ]
Error:
! Test failures.
Execution haltedr-oldrel-windows-x86_64
Running 'testthat.R' [22s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> library(testthat)
> library(DesignLibrary)
Loading required package: DeclareDesign
Loading required package: randomizr
Loading required package: fabricatr
Loading required package: estimatr
>
> test_check(package = "DesignLibrary")
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
Saving _problems/test_designers-37.R
Saving _problems/test_designers-128.R
Saving _problems/test_diagnose_designers-6.R
[ FAIL 3 | WARN 18 | SKIP 0 | PASS 323 ]
══ Failed tests ═══════════════════
...[truncated]...
└─DeclareDesign (local) `<fn>`(design = dots[[1L]][[2L]], sims = dots[[2L]][[2L]], future.seed = dots[[3L]][[1L]])
5. ├─base::withCallingHandlers(...)
6. ├─base::suppressWarnings(...)
7. │ └─base::withCallingHandlers(...)
8. └─DeclareDesign:::future_lapply(...)
9. └─base::lapply(...)
10. └─DeclareDesign (local) FUN(X[[i]], ...)
11. ├─DeclareDesign:::run_design_internal(design)
12. └─DeclareDesign:::run_design_internal.design(design)
13. └─DeclareDesign:::next_step(step, current_df, i)
14. └─base::tryCatch(...)
15. └─base (local) tryCatchList(expr, classes, parentenv, handlers)
16. └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
17. └─value[[3L]](cond)
[ FAIL 3 | WARN 18 | SKIP 0 | PASS 323 ]
Error:
! Test failures.
Execution haltedr-patched-linux-x86_64
Running ‘testthat.R’ [16s/19s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(DesignLibrary)
Loading required package: DeclareDesign
Loading required package: randomizr
Loading required package: fabricatr
Loading required package: estimatr
>
> test_check(package = "DesignLibrary")
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
Saving _problems/test_designers-37.R
Saving _problems/test_designers-128.R
Saving _problems/test_diagnose_designers-6.R
[ FAIL 3 | WARN 18 | SKIP 0 | PASS 323 ]
══ Failed tests ═══════════════
...[truncated]...
└─DeclareDesign (local) `<fn>`(design = dots[[1L]][[2L]], sims = dots[[2L]][[2L]], future.seed = dots[[3L]][[1L]])
5. ├─base::withCallingHandlers(...)
6. ├─base::suppressWarnings(...)
7. │ └─base::withCallingHandlers(...)
8. └─DeclareDesign:::future_lapply(...)
9. └─base::lapply(...)
10. └─DeclareDesign (local) FUN(X[[i]], ...)
11. ├─DeclareDesign:::run_design_internal(design)
12. └─DeclareDesign:::run_design_internal.design(design)
13. └─DeclareDesign:::next_step(step, current_df, i)
14. └─base::tryCatch(...)
15. └─base (local) tryCatchList(expr, classes, parentenv, handlers)
16. └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
17. └─value[[3L]](cond)
[ FAIL 3 | WARN 18 | SKIP 0 | PASS 323 ]
Error:
! Test failures.
Execution haltedr-release-linux-x86_64
Running ‘testthat.R’ [17s/18s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(DesignLibrary)
Loading required package: DeclareDesign
Loading required package: randomizr
Loading required package: fabricatr
Loading required package: estimatr
>
> test_check(package = "DesignLibrary")
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
Saving _problems/test_designers-37.R
Saving _problems/test_designers-128.R
Saving _problems/test_diagnose_designers-6.R
[ FAIL 3 | WARN 18 | SKIP 0 | PASS 323 ]
══ Failed tests ═══════════════
...[truncated]...
└─DeclareDesign (local) `<fn>`(design = dots[[1L]][[2L]], sims = dots[[2L]][[2L]], future.seed = dots[[3L]][[1L]])
5. ├─base::withCallingHandlers(...)
6. ├─base::suppressWarnings(...)
7. │ └─base::withCallingHandlers(...)
8. └─DeclareDesign:::future_lapply(...)
9. └─base::lapply(...)
10. └─DeclareDesign (local) FUN(X[[i]], ...)
11. ├─DeclareDesign:::run_design_internal(design)
12. └─DeclareDesign:::run_design_internal.design(design)
13. └─DeclareDesign:::next_step(step, current_df, i)
14. └─base::tryCatch(...)
15. └─base (local) tryCatchList(expr, classes, parentenv, handlers)
16. └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
17. └─value[[3L]](cond)
[ FAIL 3 | WARN 18 | SKIP 0 | PASS 323 ]
Error:
! Test failures.
Execution haltedr-release-windows-x86_64
Running 'testthat.R' [15s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> library(testthat)
> library(DesignLibrary)
Loading required package: DeclareDesign
Loading required package: randomizr
Loading required package: fabricatr
Loading required package: estimatr
>
> test_check(package = "DesignLibrary")
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
[1] "The implied ICC in (control) is 0.667"
[1] "The implied ICC in (control) conditional on block is 0.5"
Saving _problems/test_designers-37.R
Saving _problems/test_designers-128.R
Saving _problems/test_diagnose_designers-6.R
[ FAIL 3 | WARN 18 | SKIP 0 | PASS 323 ]
══ Failed tests ═══════════════════
...[truncated]...
└─DeclareDesign (local) `<fn>`(design = dots[[1L]][[2L]], sims = dots[[2L]][[2L]], future.seed = dots[[3L]][[1L]])
5. ├─base::withCallingHandlers(...)
6. ├─base::suppressWarnings(...)
7. │ └─base::withCallingHandlers(...)
8. └─DeclareDesign:::future_lapply(...)
9. └─base::lapply(...)
10. └─DeclareDesign (local) FUN(X[[i]], ...)
11. ├─DeclareDesign:::run_design_internal(design)
12. └─DeclareDesign:::run_design_internal.design(design)
13. └─DeclareDesign:::next_step(step, current_df, i)
14. └─base::tryCatch(...)
15. └─base (local) tryCatchList(expr, classes, parentenv, handlers)
16. └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
17. └─value[[3L]](cond)
[ FAIL 3 | WARN 18 | SKIP 0 | PASS 323 ]
Error:
! Test failures.
Execution halted- ERROR4 OK, 9 ERRORNow
- ERROR11 OK, 2 ERROR2026-10-10
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 24includes a package overview page
- Examples that run
- 100%16 run in a plain check
- Exported functions with examples
- 94%
- Documented parameters
- 97%
- Return-value docs
- 94%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- 94%
- Median days to close, 50 most recently updated closed issues
- 11
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
8 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/declaredesign/designlibrary on 2026-10-18.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
Show all practicesHide 1 practice
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-08-27Commits: at least 8 crediting it in the message
- Claude Opus 58 commits · Aug to Sep 2026
Dependencies
Installing DesignLibrary adds 18 packages (11 with compiled code, 9.0 MB of source tarballs). Heaviest: Rcpp 1.8 MB, RcppEigen 1.7 MB, vctrs 1.0 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- 0.1.10Latest
- 0.1.82021-09-02 · diff ↗
- RR 4.1.0 released · 2021-05-18
- 0.1.62021-03-02 · diff ↗
- 0.1.5.52020-12-01 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 0.1.42019-06-17 · diff ↗
- 0.1.3
- RR 3.6.0 released · 2019-04-26
- 0.1.22018-11-12 · diff ↗ ·
added 4 exports
binary_iv_designer, spillover_designer, two_arm_designer, two_by_two_designer - 0.1.12018-08-25 · diff ↗ ·
added 3 exports
factorial_designer, process_tracing_designer, simple_iv_designer
Show 2 earlier eventsHide 2 earlier events
- 0.1.02018-08-09
- RR 3.5.0 released · 2018-04-23
Package metadata
- First published
- 2018-08-09
- Total releases
- 9 / 8 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 3.4.0
- Download size
- 51 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("DesignLibrary")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-20, which the citation names so these numbers can be found later. More on citing and the projects behind them.