A template repository for reproducible research projects
✏️ 📈 📓 📊 🔬 💻
Check out the example rendered HTML files
- Step 1 of an analysis, which generates some output
- Step 2 of an analysis, which loads the output from document
01
- A header with the project source link
- ⚙️ A configuration section at the beginning of each Rmd, which specifies the project directory the paths to the outputs, and seed which is automtically set:
- 🛠️ A reproducibility section at the end of each Rmd, which prints out key information for reproducing the analysis, like the time the document was last rendered, the last commit in the git repository, and the R session info:
- A custom footer with lab logo & link, and link to the
rr
template repository
- Helper functions for writing TSVs & R objects with a concise description, and loading that description & some file info when reading the TSV / loading the R object
Load output
- Helper functions for saving source data when generating figures with ggplot2:
- Chunk numbering
- Printing the output path of figures, based on the chunk name:
Highly recommended:
- 📦
{renv}
- On GitHub, click the "Use this template button"
-
Follow the instructions to make a new repository, and clone it to your machine
-
Source the
rr_helpers.R
file by runningsource("rr_helpers.R")
, from the root of the project directory, and runrr_initialize()
, following the prompts to clean up the repository for first use, and customize the template. -
To start new analyses, copy
include/template.Rmd
to theanalysis
folder, and code away! -
Whenever you make changes, commit them with git and push to the remote.
-
To create a GitHub Pages site, make sure to commit HTMLs. It's recommended to only do this once they are relatively final, since self-contained HTMLs can be quite large files. In the settings for the GitHub repository, enable pages from the
/root
directory:
- 🚀 Profit!