Quick Reference
Everything you need on one page
Project structure
my_paper/
├── _quarto.yml # project config
├── index.qmd # manuscript (text only)
├── analysis.qmd # all R code
├── data/
│ ├── raw/ # NEVER modify
│ └── derived/ # output of analysis.qmd
├── outputs/
│ ├── figures/ # figures from analysis.qmd
│ └── tables/ # tables from analysis.qmd
├── references/references.bib
└── README.md
Day 1 setup
# Set up renv
install.packages("renv")
renv::init()
renv::snapshot()Then in Positron:
- Source Control → Initialize Repository
- Stage all → Commit → Publish to GitHub (Public)
- zenodo.org → Settings → GitHub → toggle repo ON
Daily workflow
In Positron Source Control panel:
- Work in
analysis.qmdandindex.qmd - Click + to stage changed files
- Write commit message → click tick to commit
- Click Sync to push to GitHub
Before submission
- zenodo.org → New Upload → fill metadata → Reserve DOI
- Add to manuscript:
Data available at https://doi.org/10.5281/zenodo.XXXXXXX
(upon acceptance) and https://github.com/user/repo
After acceptance
- Final commit:
"final version — accepted by [Journal]" - Sync to GitHub
- GitHub → Releases → Create release → tag
v1.0→ Publish - zenodo.org → find draft → Publish
- Update data availability statement (remove “upon acceptance”)
renv commands
renv::init() # set up renv in a new project
renv::snapshot() # update lockfile after installing packages
renv::restore() # install packages from lockfile (for reproducibility)Render order
Always render in this order if analysis has changed:
- Render
analysis.qmd→ updates figures inoutputs/ - Render
index.qmd→ uses updated figures
Licenses
| Content type | License |
|---|---|
| Data | CC BY 4.0 |
| Code | MIT |
| Guide/manuscript | CC BY 4.0 |
Tools and links
| Tool | URL |
|---|---|
| Quarto | quarto.org |
| Positron | positron.posit.co |
| GitHub | github.com |
| Zenodo | zenodo.org |
| Anonymous GitHub | anonymous.4open.science |
| renv docs | rstudio.github.io/renv |
Further reading
- Le Foll (2026): Quarto for Reproducible Research
- blenback: R for Reproducible Research
- SIB Swiss: Make Your Research FAIRer