Workflow leaderboard / Research / Data analysis

Build a reproducible R statistical report

可复现的 R 统计报告

Research / 科研 Data analysis / 数据分析 curated verified 2026-08-02

Combine statistical code, narrative, tables and figures in one versioned report with a restorable R package environment.

Variants

Free & local / 免费本地 ~35 min setup

Any 8 GB laptop for ordinary statistical models. Large Bayesian or spatial models may require more RAM and longer compile times.

ComponentRolePriceLink
Quarto 1.10.18 render code, narrative, citations and figures into HTML or PDF Free / 免费MIT open-source publishing systemchecked 2026-08-02 https://github.com/quarto-dev/quarto-cli/releases/tag/v1.10.18
R with renv R 4.6.1 plus renv 1.2.3 statistical runtime and project-local dependency lock Free / 免费open-source runtime and package managerchecked 2026-08-02 https://github.com/rstudio/renv/releases/tag/v1.2.3

Quarto project configuration

project:
  type: manuscript
  output-dir: _output
format:
  html:
    toc: true
    code-fold: true
  pdf:
    keep-tex: true
execute:
  freeze: auto
  warning: true
  error: false
bibliography: references.bib
csl: style.csl

Lock and render from a clean R session

Rscript -e "if (!requireNamespace('renv', quietly=TRUE)) install.packages('renv'); renv::init(bare=TRUE); renv::snapshot(prompt=FALSE)"
quarto check
quarto render
test -d _output
Rscript -e "renv::status()" > _output/renv-status.txt
sha256sum renv.lock _quarto.yml _output/* > _output/SHA256SUMS

Known pitfalls

  • A lockfile records packages, not external system libraries.
  • Set random seeds inside analysis code and record simulation settings.
  • Quarto freeze can reuse old computed results; clear or refresh intentionally before release.
  • PDF rendering also depends on a TeX distribution.
Cloud premium / 云端高配 ~20 min setup

Browser only. Check storage, memory and project-hour limits for the selected hosted plan.

ComponentRolePriceLink
Posit Cloud hosted service current 2026-08-02 managed RStudio and Quarto project environment Subscription (rate not published) / 订阅制(费率未公开)unverified current regional plan price and compute-hour allowances; confirm on official pricing pagechecked 2026-08-02 https://posit.cloud/plans
Quarto 1.10.18 stable portable report source and rendering Free / 免费software is open source; hosted compute is separatechecked 2026-08-02 https://github.com/quarto-dev/quarto-cli/releases/tag/v1.10.18

Cloud export manifest

export_before_archive:
  - source_qmd
  - _quarto.yml
  - renv.lock
  - references.bib
  - style.csl
  - data_dictionary.md
  - sessionInfo.txt
  - rendered_html_or_pdf
exclude:
  - credentials
  - raw_restricted_data
  - temporary_cache
rule: Verify the exported project renders outside the hosted workspace.

Known pitfalls

  • Hosted compute limits and prices can change.
  • Do not place secrets in .Rhistory or report source.
  • Export the complete project before account or plan changes.
  • Cloud reproducibility still requires a lockfile and external dependency notes.

Evidence