Skip to contents

Turns a study_status result into markdown: one checkbox per check, ticked where the check passed ("OK") or the study is closed ("CLOSED") and left open otherwise, with the detail alongside. File counts follow.

Usage

study_checklist(status, path = NULL)

Arguments

status

An object of class "study_status", from study_status or study_setup.

path

Character(1) or NULL. Where to write the markdown. When NULL (default) the lines are returned instead of written.

Value

When path is NULL, a character vector of markdown lines. Otherwise path, invisibly, after writing.

Examples

root <- file.path(tempdir(), "study-checklist-example")
dir.create(root, showWarnings = FALSE)
cat(study_checklist(study_status(root)), sep = "\n")
#> # Study readiness
#> 
#> Study root: `/tmp/RtmpAxnHxw/study-checklist-example`
#> 
#> ## Checks
#> 
#> - [ ] **_study.yml** — no _study.yml at this root; recovery may be available with study-setup --recover; if its Tracker ID cannot be inferred, run study-setup 42 --recover
#> - [ ] **renv.lock** — no renv.lock; run renv::init() in the study project
#> - [ ] **manifest.yaml** — no manifest.yaml; register_data() creates it
#> - [ ] **dataset** — requires a valid _study.yml
#> - [ ] **provenance** — no .qmd/.Rmd sources found; 0 sidecars
#> 
#> ## Counts
#> 
#> - `.R` files: 0
#> - `.qmd`/`.Rmd` sources: 0
#> - `.sas` jobs: 0
#> - provenance sidecars: 0
unlink(root, recursive = TRUE)