Project creation with prodigenr: A component of reproducible and open scientific projects
This R package is part of a series of (planned) packages that are aimed at creating a toolkit for doing reproducible and open science. Many researchers (especially in biomedicine, medicine, or health, which is my area of research) have little to no knowledge on what open science is or what reproducibility is, let alone how to do it. Our goal is create an (opinionated) toolkit to automate and simplify the process of doing open and reproducible science.
This specific package is a project directory generator (prodigenr). It will create a standardized project folder structure with the necessary template files for managing and analyzing data and for creating common scientific output (posters, slides, abstracts, manuscripts). Because of the standardized structure and because of the focus on a “one project, one scientific output”, this allows the final code and documents to be fairly modular, self-contained, easy to share and make public… and be as reproducible as possible. This folder structure also makes use of the existing and established applications and workflows (RStudio, devtools, and usethis). This package aims to make it easier to adhere to open scientific practices by following a standard, consistent, and established folder and file structure for data analysis projects.
Installation
You can install the released version of prodigenr from CRAN with:
install.packages("prodigenr")
And the development version from GitHub with:
# install.packages("remotes")
remotes::install_github("lwjohnst86/prodigenr")
Usage
There are two ways of creating a new project: using the R console or using the RStudio “New Project” menu option.
Through the console, use the setup_project()
command. So, for
instance, if you want a manuscript project, type out:
library(prodigenr)
setup_project("~/Desktop/DiseaseDiet")
This then creates a directory tree, with template files for starting
your analysis! Open the newly created project via the .Rproj
file.
For the RStudio approach, go to “File -> New Project”, then “New
directory” and find the prodigenr project in the list:
Once in the project, you can add a manuscript R Markdown file or poster using:
create_manuscript()
# Or...
create_poster()
# etc.
The main secondary function is the template_list
command, which lists
the available template files (submit a PR if you want another template
included!):
template_list
#> [1] "abstract" "manuscript" "poster" "slides"
For a more detailed tutorial, see the introduction vignette:
vignette('prodigenr', 'prodigenr')
Related packages or projects
There are several existing packages for creating projects, each of which has it’s own pros and cons. Try them out and see which you like!
- ProjectTemplate
- makeProject
- R package structure via devtools, argued for in this blog
- rrtools
prodigenr tries to use ideas from R packages/devtools while still being as simple as possible and to be more specific to academic researchers primarily in biomedical/non-computer science fields. However, it can always improve! I welcome any suggestions, just submit a GitHub issue!
Interested in contributing?
See the contributing documentation for information on how to contribute. Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
Special thanks to @zsemnani for creating the logo!