SPEA V706 — Statistics for Research in Public Affairs
main.r pipelineType a line, hit enter, see the result. Repeat.
Move the good lines into a saved .r file and run it top to bottom.
Quarto, R Markdown, or Jupyter — code, prose, and output woven together.
main.r + Numbered ScriptsSplit the work into small scripts, each doing one job. One file runs them in order.
main.r is the recipe: run it in a fresh session and the whole analysis rebuildsmain.r** builds and rebuilds every number in the paper| Saved? | Rerun cleanly? | Reproducible? | Best for | |
|---|---|---|---|---|
| 1. Console | no | no | no | exploring, quick checks |
| 2. One script | yes | partly | partly | small one-off tasks |
| 3. Notebook | yes | if you render | yes, if disciplined | reports, teaching |
| 4. Pipeline | yes | yes | yes | research, replication |