Skip to content

Repository files navigation

reflowR reflowR logo

DOI

Themed extensions for workflowr research workflows

R-CMD-check pkgdown CRAN status Codecov test coverage CRAN downloads CRAN downloads total License: MIT Lifecycle: experimental

Overview

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.

Theming

  • 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

Scaffolding

  • 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.).

Installation

# install.packages("pak")
pak::pak("cttir/reflowR")
# workflowr is installed automatically as a dependency

Or using remotes:

remotes::install_github("cttir/reflowR")

Quick Start

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")

Color Schemes

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()

Depth Presets

Preset Steps Best For
minimal 3 Quick explorations, side analyses
standard 8 Standard research projects, publications
extended 12 Clinical trials, comprehensive studies
reflow_presets()

How It Works

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.

Getting Help

Citation

citation("reflowR")

Contributing

Contributions are welcome. Please open an issue first to discuss what you would like to change, then submit a pull request.

Use of LLM tools

Portions of this package were prepared with assistance from large language model tooling for narrowly defined, non-authorial tasks: copyediting, prose smoothing, Markdown/LaTeX formatting, scaffolding of boilerplate files (CI configs, build scripts), code refactoring. The tools used were Chat AI, the LLM service of KISSKI (GWDG), and a self-hosted Mistral Small (24B, Apache-2.0) run locally via Ollama and the ollamar R package — local inference only, with no data sent to third parties for the self-hosted model.

All scientific claims, methodological choices, analyses, interpretations, and conclusions are the author's own. No LLM-generated text was incorporated without review and revision, and every reference was verified against its DOI, arXiv ID, or ISBN.

License

MIT

Recorded imaging workflows

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.

About

Custom workflowr themes and templates for reproducible research websites in R

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages