A minimal, reproducible starting point for an R research project: a simple
folder layout, a curated .gitignore, pinned packages with renv, data checks
with testthat, and a place for external data with pins. Download
it, delete what you do not need, and start working.
- Download this repository as a zip file, unzip it and rename the folder to
your project name. You start with no git history; run
git initwhen you are ready (or forced) to use git. - Open
project-skeleton.Rprojin RStudio (rename it to match your project). - Put raw data in
data/raw/and edit the numbered scripts inscripts/. - Replace the placeholders in
CITATION.cffandLICENSE. - Run
renv::init()at the end of the project, before you share the code (seePROJECT_STRUCTURE.md). - Read
PROJECT_STRUCTURE.md, then delete it. Rewrite thisREADME.mdto describe your own project.
.
├── CITATION.cff
├── LICENSE
├── PROJECT_STRUCTURE.md
├── project-skeleton.Rproj
├── R
│ ├── README.md
│ └── check_data.R
├── README.md
├── data
│ ├── README.md
│ ├── processed
│ │ └── README.md
│ └── raw
│ └── README.md
├── docs
│ ├── README.md
│ └── img
│ ├── README.md
│ └── (logos)
├── outputs
│ └── README.md
├── scripts
│ ├── 1_download.R
│ ├── 2_wrangle.R
│ ├── 3_analyse.R
│ └── README.md
└── tests
├── README.md
├── testthat
│ ├── README.md
│ ├── helper-functions.R
│ └── test-check_data.R
└── testthat.R
Details, rules and recipes are in PROJECT_STRUCTURE.md: documentation of this skeleton, to read and then delete.
Optional extras live in separate branches: zenodo, website and githooks.
You will not see them unless you look for them: PROJECT_STRUCTURE.md
describes each one and links to it.



