README.md

makereproducible

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.

Installation


## Install the current development version from GitHub

devtools::install_github("jaeyk/makereproducible",
        dependencies = TRUE)

library(makereproducible)

Usage

make_here

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.

The 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 here() function.

To learn how to use it, see the examples below.

  1. Not self-contained because this absolute path only works in my laptop! (BAD)

read_csv("/home/jae/validating-two-linked-fates/raw_data/sub-data.txt")
  1. Voila! Now, the project is self-contained. (GOOD)

read_csv(make_here("/home/jae/validating-two-linked-fates/raw_data/sub-data.txt"))

Instructions

Only two conditions are needed to make the make_here() function work.

How to cite

If you would like to cite, please do something like the following:

Jae Yeon Kim. (2020). makereproducible. R package version 0.1.0. Retrieved from https://github.com/jaeyk/makereproducible


jaeyk/makereproducible documentation built on Oct. 12, 2020, 2:12 a.m.