An R Package for Making a Project Computationally Reproducible Before Sharing it
Author: Jae Yeon Kim
File an issue if you have problems, questions or suggestions.
Creating self-contained projects is great to increase research reproducibility and make your life easier. To make a project self-contained, one of the things you need to do is STOP using
setwd() and START using alternatives like
here(). The problem is people, including, and especially me, are lazy. We know the best practice, but we don’t follow it.
make_here() function nudges you to make your project self-contained before sharing it with other people. It does this by saving typing time to turn the relative or absolute path in your R code into the arguments in the
To learn how to use it, see the examples below.
Only two conditions are needed to make the
make_here() function work.
foo) and divided different types of files into different subdirectories (
.herein the main project directory (minimal effort).
here::dr_here()helps to check whether these two conditions were met. If setup correclty, you should be able to see something like the following:
here() starts at [your main project directory], because it [satisfies one of the conditions listed above].