Skip to content
/ rr Public template

Custom, lightweight template workflow for reproducible research projects in R

Notifications You must be signed in to change notification settings

sjessa/rr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rr

A template repository for reproducible research projects
✏️ 📈 📓 📊 🔬 💻 :octocat:

Check out the example rendered HTML files

  1. Step 1 of an analysis, which generates some output
  2. Step 2 of an analysis, which loads the output from document 01

Contents:

Features

  • 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

Make output

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:

Requirements

Highly recommended:

Usage:

  1. On GitHub, click the "Use this template button"

  1. Follow the instructions to make a new repository, and clone it to your machine

  2. Source the rr_helpers.R file by running source("rr_helpers.R"), from the root of the project directory, and run rr_initialize(), following the prompts to clean up the repository for first use, and customize the template.

  3. To start new analyses, copy include/template.Rmd to the analysis folder, and code away!

  4. Whenever you make changes, commit them with git and push to the remote.

  5. 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:

  1. 🚀 Profit!

About

Custom, lightweight template workflow for reproducible research projects in R

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages