Themed extensions for workflowr research workflows
reflowR extends the workflowr package with themed color schemes, structured analysis pipeline templates, and utility scripts for reproducible research. It wraps workflowr::wflow_start() to create a standard workflowr project, then layers on a complete theming and scaffolding system.
- 5 color schemes -- clinical (red), basic research (steelblue), code/statistics (forest green), special (purple), other (grey) -- each with a custom SVG icon, 8-color palette, and full CSS/SCSS theme
- ggplot2 theme + table styling that automatically matches the selected scheme
- Themed navbar with gradient, icon, and pipeline dropdown menu
- 3 depth presets -- minimal (3 steps), standard (8 steps), extended (12 steps) -- providing a structured Rmd analysis pipeline
- 6 utility scripts in
code/-- setup, utils, formulary, data I/O, table helpers, plot helpers - Quarto report template with dual HTML/PDF output
All generated projects remain fully compatible with standard workflowr commands (wflow_build(), wflow_publish(), etc.).
# install.packages("pak")
pak::pak("cttir/reflowR")
# workflowr is installed automatically as a dependencyOr using remotes:
remotes::install_github("cttir/reflowR")library(reflowR)
# Create a clinical research project with the standard 8-step pipeline
reflow_init(
directory = "~/projects/my_analysis",
author = "Your Name",
email = "you@example.com",
scheme = "clinical",
depth = "standard"
)
# Then use standard workflowr commands:
workflowr::wflow_build()
workflowr::wflow_publish("analysis/*.Rmd", message = "Initial build")| Scheme | Label | Primary | Use Case |
|---|---|---|---|
clinical |
Clinical Research | #C8102E |
Clinical trials, patient data |
basic |
Basic Research | #4682B4 |
Lab research, general science |
code |
Code & Statistics | #228B22 |
Software dev, statistical methods |
special |
Special | #6A0DAD |
Special projects, reviews |
other |
Other | #2C2C2C |
Neutral, multipurpose |
Preview any scheme interactively:
reflow_preview("clinical")
reflow_schemes()| Preset | Steps | Best For |
|---|---|---|
minimal |
3 | Quick explorations, side analyses |
standard |
8 | Standard research projects, publications |
extended |
12 | Clinical trials, comprehensive studies |
reflow_presets()reflowR calls workflowr::wflow_start() to create the standard workflowr scaffold, then enhances it with themed files. The result is a standard workflowr project -- all workflowr commands work as expected.
- Browse the function reference
- Read the Getting Started vignette
- File issues at GitHub Issues
citation("reflowR")Contributions are welcome. Please open an issue first to discuss what you would like to change, then submit a pull request.
MIT
The imaging API runs a sequential graph of exported package functions, with explicit references to upstream R objects. It is independent of workflowr scaffolding and does not create Git repositories or publish anything.
plan <- reflow_imaging_plan(
reflow_imaging_stage("summary", "base", "summary", list(object = 1:4)),
reflow_imaging_stage("mean", "base", "mean",
list(x = reflow_imaging_ref("summary")))
)
run_dir <- tempfile("imaging-run-")
results <- reflow_imaging_run(plan, run_dir)
verified <- reflow_imaging_resume(plan, run_dir)Use reflow_imaging_input(path) for tracked files or directories, or set
read = TRUE to pass an RDS input as an object. Use the reference's select
argument to extract named nested components. Declare optional package backends
with the plan's packages argument and stochastic calls with a stage seed.
Receipts record configuration, input, installed code, runtime and output hashes. Resume verifies completed results; changed inputs or corrupt results require a new run directory. Common numerical thread environment settings are recorded and changes invalidate resume; this does not measure effective backend thread counts or capture in-process thread setters. Failed or interrupted calls retry in new attempt directories. A lock prevents concurrent execution; stale locks require manual inspection. Inputs must remain immutable during execution. Calls must be trusted, return plain serializable R objects, and avoid external side effects: this is not a sandbox. Resource scheduling, file-producing stages, external engine provenance, review dashboards and report recipes are not yet implemented by this API.
Where applicable, LLM tools were used for narrowly defined, non-authorial tasks: copyediting, prose refinement, Markdown/LaTeX formatting, boilerplate scaffolding (such as CI configurations and build scripts), and code refactoring. Tools included Chat AI, the KISSKI (GWDG) service, and self-hosted Mistral Small (24B, Apache-2.0) served through a local vLLM architecture on an Ubuntu Linux workstation with Intel processors and NVIDIA GPUs. The self-hosted model ran locally, with no data sent to third parties.
All scientific claims, methodological choices, analyses, interpretations and conclusions remain the authors' own. Where applicable, LLM-generated material must be reviewed and revised before inclusion, and references must be verified against their DOI, arXiv ID or ISBN.
Local software setup: vLLM with Python/PyTorch, plus R and RStudio.
