Generic R compendium template for reproducible projects using renv, targets, and Quarto.
- Reproducible env with
renv - Pipeline with
{targets} - Tests with
{testthat} - Docs with Quarto under
docs/andreports/ - Vignettes under
vignettes/ - Package site with
pkgdown(configured fordocs/pkgdown/)
Clone and use as a basis for data projects in R.
Quick start (in RStudio Console):
renv::restore(prompt = FALSE)
source("dependencies.R")
pak::pkg_install(project_dependencies())
devtools::document()
testthat::test_dir("tests/testthat", reporter = "summary")Run the pipeline after restoring deps:
targets::tar_make()Render docs:
quarto render docs/Build the pkgdown site (outputs to docs/pkgdown/):
pkgdown::build_site(preview = FALSE)Browse the vignette:
utils::browseVignettes(package = "rcompendium")Key targets out of the box:
cfg: configuration listraw_manifest: parsed input manifestinput_files: file paths tracked as dependencies (format = "file")data_preview: lightweight preview of CSV inputscombined_data: combined tibble across CSV inputs (common columns)manifest_summary: counts and distinct file metricsreport: rendersreports/paper.qmd
See docs/DEVELOPMENT.qmd for notes and conventions.