Package: DesignLibrary 2.0.0

Alexander Coppock

DesignLibrary: A Library of Declared Designs

A lightweight library of research designs declared with 'DeclareDesign'. Designs live as self-contained R files; editable parameters are read from the design itself. Optional YAML metadata adds labels, categories, tips, and book aliases. Includes maintainer tools to index, audit, and bake small diagnosis previews, plus a bundled Shiny browser (`designs_shiny_app()`).

Authors:Macartan Humphreys [aut], Graeme Blair [aut], Jasper Cooper [aut], Alexander Coppock [aut, cre], Clara Bicalho [aut], Neal Fultz [aut], Lily Medina [aut]

DesignLibrary_2.0.0.tar.gz
DesignLibrary_2.0.0.zip(r-4.7-any)DesignLibrary_2.0.0.zip(r-4.6-any)DesignLibrary_2.0.0.zip(r-4.5-any)
DesignLibrary_2.0.0.tgz(r-4.6-any)DesignLibrary_2.0.0.tgz(r-4.5-any)
DesignLibrary_2.0.0.tar.gz(r-4.7-any)DesignLibrary_2.0.0.tar.gz(r-4.6-any)
DesignLibrary_2.0.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
DesignLibrary/json (API)

# Install 'DesignLibrary' in R:
install.packages('DesignLibrary', repos = c('https://declaredesign.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/declaredesign/designlibrary/issues

Pkgdown/docs site:https://declaredesign.org

On CRAN:

Conda:

7.54 score 30 stars 81 scripts 1.1k downloads 43 exports 30 dependencies

Last updated from:0830e30199. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK232
source / vignettesOK247
linux-releaseOK143
macos-releaseOK145
macos-oldrelOK151
windows-develOK112
windows-releaseOK118
windows-oldrelOK118
wasm-releaseOK104

Exports:audit_designsbake_previewsbinary_iv_designerblock_cluster_two_arm_designerbuild_docscluster_sampling_designercontributor_checklistcopy_library_shinydesign_infodesign_profiledesigns_shiny_appexcluded_diagnosandsfactorial_designerget_argsget_codeget_design_codeget_previewhas_previewinstall_library_dependencieslist_designsmake_designmake_indexmatch.call.defaultsmediation_analysis_designermulti_arm_designerparam_coverage_gapsparam_coverage_reportpreferred_diagnosandspretest_posttest_designerprocess_tracing_designerrandomized_response_designerrefresh_libraryregression_discontinuity_designersimple_factorial_designersimple_iv_designersimple_spillover_designersimple_two_arm_designerspillover_designertwo_arm_attrition_designertwo_arm_covariate_designertwo_arm_designertwo_by_two_designerwrite_audit_report

Dependencies:backportsbroomclicpp11DeclareDesigndplyrestimatrfabricatrFormulagenericsgluelifecyclemagrittrpillarpkgconfigpurrrR6randomizrRcppRcppEigenrlangstringistringrtibbletidyrtidyselectutf8vctrswithryaml

Contributing a design
The short version | 1. Fork | 2. Add your file | 3. Refresh | 4. Check | 5. Pull request | YAML fields | Checklist

Last update: 2026-10-28
Started: 2026-08-05

DesignLibrary: a library of declared designs
The idea | What a design file looks like | What designs are included? | Use DesignLibrary to make a design | Change parameters and simulate | Browse in Shiny | Maintainer tools

Last update: 2026-10-28
Started: 2026-09-26

Upgrading from DesignLibrary 0.1: what changes, what does not, and why
The short version | What does not change | What changes, and why | Removed functions | block_cluster_two_arm_designer() takes new arguments | multi_arm_designer() has a larger default sample | Two renamings that change no values | args_to_fix is ignored | Designs are now all DeclareDesign 2.0 designs | Sweeping a parameter | Porting an existing script | What is new

Last update: 2026-10-28
Started: 2026-10-26

Readme and manuals

Help Manual

Help pageTopics
Audit one or more designsaudit_designs
Bake compact diagnosis previews into inst/previewsbake_previews
Create a binary instrumental variables designbinary_iv_designer
Create a blocked and clustered two-arm designblock_cluster_two_arm_designer
Build the pkgdown site (Dropbox-safe)build_docs
Create a two-stage cluster sampling designcluster_sampling_designer
Contributor checklist for a designcontributor_checklist
Copy the bundled Shiny app to a standalone foldercopy_library_shiny
Design metadata (YAML + defaults)design_info
Character profile for a design (same prose as printing 'design_info()')design_profile
Launch the DesignLibrary Shiny browserdesigns_shiny_app
Diagnosands excluded from display by YAMLexcluded_diagnosands
Create a 2^k factorial designfactorial_designer
Editable parameters for a designget_args
Code for a design: simple 'make_design()' call and/or full sourceget_code
Defunct helpers from DesignLibrary 0.1get_design_code match.call.defaults
Load a baked diagnosis previewget_preview
Whether a baked preview exists for a designhas_preview
Install DesignLibrary system dependenciesinstall_library_dependencies
List designs in the librarylist_designs
Build a design, optionally with redesigned parametersmake_design
Build an in-memory index of all designsmake_index
Create a mediation analysis designmediation_analysis_designer
Create a multi-arm designmulti_arm_designer
Objects declared before design, used by it, but missing from design paramsparam_coverage_gaps
Report declared-before-design objects missing from design parametersparam_coverage_report
Preferred diagnosands declared in a design's YAMLpreferred_diagnosands
Create a pretest-posttest designpretest_posttest_designer
Print the parameter table from get_args()print.design_library_args
Create a process tracing design with two cluesprocess_tracing_designer
Create a randomized response designrandomized_response_designer
Refresh the library (maintainer one-stop)refresh_library
Create a regression discontinuity design with a polynomial fitregression_discontinuity_designer
Defunct designer aliases from DesignLibrary 0.1simple_factorial_designer simple_iv_designer simple_spillover_designer simple_two_arm_designer
Create a two-arm design with spillovers within groupsspillover_designer
Create a two-arm design with attritiontwo_arm_attrition_designer
Create a two-arm design with a possibly prognostic covariatetwo_arm_covariate_designer
Create a one-level two-arm designtwo_arm_designer
Create a two-by-two factorial designtwo_by_two_designer
Write audit results to CSV, markdown, and plain text under tools/write_audit_report