https://github.com/aaronpeikert/reproducible-research
  
  
    A Reproducible Data Analysis Workflow with R Markdown, Git, Make, and Docker 
    https://github.com/aaronpeikert/reproducible-research
  
containerization dependency-management literate-programming open-science r reproducibility version-management
        Last synced: 7 months ago 
        JSON representation
    
A Reproducible Data Analysis Workflow with R Markdown, Git, Make, and Docker
- Host: GitHub
 - URL: https://github.com/aaronpeikert/reproducible-research
 - Owner: aaronpeikert
 - License: cc-by-4.0
 - Created: 2019-09-03T12:48:03.000Z (about 6 years ago)
 - Default Branch: master
 - Last Pushed: 2022-03-31T12:32:12.000Z (over 3 years ago)
 - Last Synced: 2025-03-26T20:21:16.757Z (7 months ago)
 - Topics: containerization, dependency-management, literate-programming, open-science, r, reproducibility, version-management
 - Language: TeX
 - Homepage: https://psyarxiv.com/8xzqy/
 - Size: 2.43 MB
 - Stars: 124
 - Watchers: 4
 - Forks: 17
 - Open Issues: 1
 - 
            Metadata Files:
            
- Readme: README.Rmd
 - License: LICENSE
 - Code of conduct: CODE_OF_CONDUCT.md
 
 
Awesome Lists containing this project
- jimsghstars - aaronpeikert/reproducible-research - A Reproducible Data Analysis Workflow with R Markdown, Git, Make, and Docker (TeX)
 
README
          ---
output:
  md_document:
    variant: gfm
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(here)
library(readr)
library(pander)
```
This is the accompanying GitHub repository to a work in progress paper by Aaron Peikert[](https://orcid.org/0000-0001-7813-818X) and Andreas M. Brandmaier [](http://orcid.org/0000-0001-8765-6982).
[](https://creativecommons.org/licenses/by/4.0) [](https://github.com/aaronpeikert/reproducible-research/issues/new) 
# Abstract
```{r abstract, child = 'abstract.Rmd'}
```
```{r, echo=FALSE}
knitr::include_graphics("Images/nutshell.svg")
```
# Resources
```{r, include=FALSE}
resources <- read_csv(here("data", "resources.csv"), trim_ws = FALSE)
```
```{r, echo=FALSE, asis=TRUE}
pander(
  resources,
  split.tables = Inf,
  split.cells = Inf,
  missing = "",
  keep.line.breaks = TRUE,
  style = "multiline"
)
```
# Compile
The following paragraphs describe how you can obtain a copy of the source files of our manuscript describing reproducible workflows, and create the PDF. Either, you can go the 'standard' way of downloading a local copy of the repository and knit the manuscript file in R, or you can use the reproducible workflow as suggested and use Make to create a container and build the final PDF file in exactly the same virtual computational environment that we used to render the PDF.
## Standard Way
Requires: `Git`, `RStudio`, `pandoc`, `pandoc-citeproc` & `rmarkdown`.
Open RStudio -> File -> New Project -> Version Control -> Git
Insert:
```
https://github.com/aaronpeikert/reproducible-research.git
```
Open `manuscript.Rmd` click on `Knit`.
## Using a Reproducible Workflow
Does not require R or RStudio, but `make` & `docker`.
Execute in Terminal:
```{bash, eval=FALSE}
git clone https://github.com/aaronpeikert/reproducible-research.git
cd reproducible-research
make build
make all DOCKER=TRUE
```
**Note: Windows user need to manually edit the `Makefile` and set current_path to the current directory and use `make all DOCKER=TRUE WINDOWS=TRUE`. We hope that future releases of Docker for Windows will not require that workaround.**
## Rebuild Everything
In case you experience some unexpected behavior with this workflow, you should check that you have the most recent version (`git pull`), rebuild the docker image (`make build`) and force the rebuild of all targets (`make -B DOCKER`).
```{bash, eval=FALSE}
git pull && make rebuild && make -B DOCKER=TRUE
```
# Session Info
```{r}
sessioninfo::session_info()
```