The goal of paprpkgr is to generate a skeleton to develop a research compendium containing the data, analysis, code, and images to reproduce one manuscript. I began working on this package around the same time that the more sophisticated rrtools package was being developed by Ben Marwick and colleagues. If you are looking to incorporate Docker or Travis in your workflows, that package will definitely be more useful to you.
You can install paprpkgr from GitHub with either of the following:
devtools::install_github("wmoldham/paprpkgr")
renv::install("wmoldham/paprpkgr")
- Create a new package using
usethis::create_package()
. - Start version control with Git by
usethis::use_git()
. - Link version control to GitHub by
usethis::use_github()
. - Restart the session when prompted.
- Run
paprpkgr::new_papr()
.
- Edit
README.Rmd
andDESCRIPTION
files with basic information about your project. - Original data goes into the
data-raw
folder. - Analyze the raw data and generate cleaned data for analysis using
Rmarkdown files in
analysis/
. Figures from these analyses should be saved inanalysis/figures/
. - The clean data should be saved by
usethis::use_data()
and documented appropriately. - Draft the manuscript and supplement using the
Rmd
templates installed inmanususcript/
. - Build processing pipeline using the
targets
package.
Many others have thought much more deeply about the hows and whys of using R packages in service of reproducible research efforts. I took my inspiration from their efforts:
- Ben Marwick and his rrtools package
- Francisco Rodriguez-Sanchez and his template package
- Carl Boettiger and his template package
- Jeff Hollister and his manuscriptPackage
- Robert Flight: http://rmflight.github.io/posts/2014/07/analyses_as_packages.html
- https://github.com/ropensci/rrrpkg
- https://github.com/Reproducible-Science-Curriculum/rr-init
- http://ropensci.github.io/reproducibility-guide/