Are you an academic researcher who often writes up abstracts for conferences or submits manuscripts to journals? Do you often have to make slides or posters for presentations? Is your usual workflow to copy a previous project and start replacing the old text for the new text? This R package was designed with you in mind!
prodigenr
, or project directory generator, simplifies the process of creating these new projects and can help make your workflow more reproducible. Standard files and folders are created for specific projects (e.g. abstracts or manuscripts), along with a workflow that tries to be simple and easy to use, while making use of the infrastructure and processes already well-developed and maintained (e.g. RStudio and devtools).
Because researchers often write or create many papers, slides, posters, and abstracts, it can quickly become tedious and messy to always make a new directory with all the necessary files and organization.
prodigen
To use prodigenr
, you simply need to use the prodigen
command. At present, there are only four template projects that you can view using:
library(prodigenr)
path <- tempdir()
template_list
#> [1] "abstract" "manuscript" "poster" "slides"
These templates are projects that an academic researcher typically encounters. However, if you have a suggestion or want to add a template, please create a Github issue or submit a Pull Request!
Starting a manuscript? Create a project directory like so (using Git):
prodigen('manuscript', 'ManuscriptName', path, git.init = TRUE)
The resulting file structure should look something like this:
.
├── R
│ ├── fetch_data.R
│ ├── functions.R
│ ├── load_data.R
│ └── setup.R
├── doc
│ └── manuscript.Rmd
├── vignettes
│ └── extra-analyses.Rmd
├── .Rbuildignore
├── .gitignore
├── DESCRIPTION
├── ManuscriptName.Rproj
├── NAMESPACE
└── README.md
3 directories, 12 files
The same procedure is used for making the other project templates.
prodigen('slides', 'PresentationName', '~/path')
prodigen('abstract', 'Name', '.') # Current directory
A README.md
file is contained within each project that explains more about what each folder does and what some of the files do that were created.
The end goal of each project is to be as self contained as possible. So that if you ever need to go back to the analysis, it is easy to re-run the code and get the results that you say you got. This is especially useful if others such as reviewers ask for something or want to confirm your results. For more information on good practices to use in making an analysis project, see here or here
In addition to the main prodigen()
function, there are several include_*()
style functions available to add other, maybe less common, files. So far there are:
include_rfigshare_script()
to send portions (or all) of your code to figshare for others to confirm or use your code and analysis workflow.include_mit_license()
to add a MIT license to your code, so that you explicitly allow others to re-use your code without legal issues coming up. Works well in conjunction with the above function.include_strobe()
to add a STROBE checklist. This is very specific to epidemiological research (which I do), so not all users will need this.You can use them by opening up the new project .Rproj
(RStudio) file and run them in the console as:
prodigenr::include_rfigshare_script()
prodigenr::include_mit_license()
prodigenr::include_strobe()
prodigenr
A typical workflow, which is also outlined in the README.md of the created project, would be to:
.Rmd
(R Markdown) file in the doc/
folder.functions.R
file) the R/
directory. Load that function using devtools::load_all()
(Ctrl-Shift-L).R/fetch_data.R
and to use the data, load it using load_data()
.vignettes/
folder to add analyses that will supplement the main document, but aren’t necessary to be included..Rmd
file in doc/
. You now have your final abstract, poster, slides, or manuscript to use for your research.